add GitLab config to copybara config

GitOrigin-RevId: d933c46b219ef6d70e3616d206236329875e928f
This commit is contained in:
Colin McMillen 2020-01-17 22:57:28 -05:00
parent ae8fa0d21d
commit 8752f53ac8
2 changed files with 31 additions and 14 deletions

View File

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

View File

@ -3,4 +3,5 @@
SCRIPT=$(readlink -f "$0") SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT") 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