Browse Source

add GitLab config to copybara config

GitOrigin-RevId: d933c46b21
master
Colin McMillen 4 years ago
parent
commit
8752f53ac8
  1. 40
      tools/copybara/copy.bara.sky
  2. 3
      tools/copybara/copybara.sh

40
tools/copybara/copy.bara.sky

@ -1,25 +1,41 @@
sourceUrl = "git@github.com:mcmillen/sneak.git"
destinationUrl = "git@github.com:mcmillen/sneak-public.git"
sourceUrlGitHub = "git@github.com:mcmillen/sneak.git"
destinationUrlGitHub = "git@github.com:mcmillen/sneak-public.git"
sourceUrlGitLab = "git@gitlab.com:SemiColinGames/sneak.git"
destinationUrlGitLab = "git@gitlab.com:SemiColinGames/sneak-public.git"
files = ["README.md", "tools/**", "Shared/**", "SharedTests/**", "Jumpy.Shared/**"]
core.workflow(
name = "default",
name = "github",
mode = "ITERATIVE",
origin = git.origin(
url = sourceUrl,
url = sourceUrlGitHub,
ref = "master",
),
destination = git.destination(
url = destinationUrl,
url = destinationUrlGitHub,
fetch = "master",
push = "master",
),
# Change path to the folder you want to publish publicly
origin_files = glob(["README.md", "tools/**", "Shared/**", "SharedTests/**", "Jumpy.Shared/**"]),
origin_files = glob(files),
authoring = authoring.pass_thru("Unknown Author <nobody@semicolin.games>"),
)
# Change the path here to the folder you want to publish publicly
#transformations = [
# core.move("", ""),
#],
core.workflow(
name = "gitlab",
mode = "ITERATIVE",
origin = git.origin(
url = sourceUrlGitLab,
ref = "master",
),
destination = git.destination(
url = destinationUrlGitLab,
fetch = "master",
push = "master",
),
origin_files = glob(files),
authoring = authoring.pass_thru("Unknown Author <nobody@semicolin.games>"),
)

3
tools/copybara/copybara.sh

@ -3,4 +3,5 @@
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
java -jar ~/bin/copybara_deploy.jar migrate $SCRIPTPATH/copy.bara.sky
java -jar ~/bin/copybara_deploy.jar migrate $SCRIPTPATH/copy.bara.sky github
java -jar ~/bin/copybara_deploy.jar migrate $SCRIPTPATH/copy.bara.sky gitlab
Loading…
Cancel
Save