Last fix, hopefully.
This commit is contained in:
parent
6a3bc49595
commit
366629e7fe
2 changed files with 7 additions and 3 deletions
|
@ -45,4 +45,4 @@ push-to-public:
|
||||||
- git fetch public
|
- git fetch public
|
||||||
- git branch -D public || true
|
- git branch -D public || true
|
||||||
- git branch public public/master
|
- git branch public public/master
|
||||||
- testtool export --push
|
- testtool export --push --move-to-master=false
|
||||||
|
|
|
@ -19,13 +19,15 @@ var exportCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
flagPush bool
|
flagPush bool
|
||||||
|
flagMoveToMaster bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(exportCmd)
|
rootCmd.AddCommand(exportCmd)
|
||||||
|
|
||||||
exportCmd.Flags().BoolVar(&flagPush, "push", false, "push to public repo")
|
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) {
|
func git(args ...string) {
|
||||||
|
@ -68,5 +70,7 @@ func exportCode(cmd *cobra.Command, args []string) {
|
||||||
git("push", "public", "public:master")
|
git("push", "public", "public:master")
|
||||||
}
|
}
|
||||||
|
|
||||||
git("checkout", "master")
|
if flagMoveToMaster {
|
||||||
|
git("checkout", "master")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue