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 branch -D public || true
|
||||
- git branch public public/master
|
||||
- testtool export --push
|
||||
- testtool export --push --move-to-master=false
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue