diff --git a/.releaser-ci.yml b/.releaser-ci.yml index 14b8695..1f5f4bf 100644 --- a/.releaser-ci.yml +++ b/.releaser-ci.yml @@ -45,4 +45,4 @@ push-to-public: - git fetch public - git branch -D public || true - git branch public public/master - - testtool export --push + - testtool export --push --move-to-master=false diff --git a/tools/testtool/commands/export.go b/tools/testtool/commands/export.go index fea7a91..c9f963b 100644 --- a/tools/testtool/commands/export.go +++ b/tools/testtool/commands/export.go @@ -19,13 +19,15 @@ var exportCmd = &cobra.Command{ } var ( - flagPush bool + flagPush bool + flagMoveToMaster bool ) func init() { rootCmd.AddCommand(exportCmd) exportCmd.Flags().BoolVar(&flagPush, "push", false, "push to public repo") + exportCmd.Flags().BoolVar(&flagMoveToMaster, "move-to-master", true, "move to master after completing export") } func git(args ...string) { @@ -68,5 +70,7 @@ func exportCode(cmd *cobra.Command, args []string) { git("push", "public", "public:master") } - git("checkout", "master") + if flagMoveToMaster { + git("checkout", "master") + } }