Skip to content

Commit

Permalink
feat: modify default branch to gh-pages (#6)
Browse files Browse the repository at this point in the history
* fix: home page cann't show custom branch commit

* feat: v0.0.2 upload to gh-pages
  • Loading branch information
wangrunlin authored Jul 15, 2022
1 parent 620532f commit 0d47717
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ var rootCmd = &cobra.Command{
// 1. checkout branch
s, _ := os.Stat(".git/refs/heads/" + branch)
if s != nil {
fmt.Println(branch + " 分支已存在")
fmt.Println(branch + " 分支已存在,切换分支")
RunCommand("git", "checkout", branch)
} else {
fmt.Println(branch + " 分支不存在, 新建分支")
fmt.Println(branch + " 分支不存在新建分支")
RunCommand("git", "checkout", "-b", branch)
}
// 2. for each
Expand Down Expand Up @@ -108,7 +108,7 @@ func Execute() {
}

func init() {
rootCmd.Flags().IntVarP(&year, "year", "y", 2022, "generate year")
//rootCmd.Flags().IntVarP(&year, "year", "y", 2022, "generate year")
rootCmd.Flags().BoolP("open", "o", false, "Open home page")
rootCmd.Flags().BoolP("push", "p", false, "Push remote repository")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var versionCmd = &cobra.Command{
}

func printGitGreenVersion() {
fmt.Println("git-green version v0.0.1")
fmt.Println("git-green version v0.0.2")
}

func init() {
Expand Down

0 comments on commit 0d47717

Please sign in to comment.