Last fix, hopefully.

This commit is contained in:
Fedor Korotkiy 2020-02-01 04:05:29 +03:00
parent 6a3bc49595
commit 366629e7fe
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -20,12 +20,14 @@ var exportCmd = &cobra.Command{
var (
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")
}
if flagMoveToMaster {
git("checkout", "master")
}
}