mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2024-11-04 21:43:42 +00:00
zz
This commit is contained in:
parent
5a19d61b7b
commit
b4550b0de9
@ -33,7 +33,7 @@ func makeVersionMarkdown(version string) string {
|
|||||||
buildTime := time.Now().Format("2006-01-02")
|
buildTime := time.Now().Format("2006-01-02")
|
||||||
|
|
||||||
return fmt.Sprintf(`
|
return fmt.Sprintf(`
|
||||||
<!-- 版本號文件,用於被其它md文件包含 -->
|
<!-- 版本号文件,用于被其它md文件包含 -->
|
||||||
|
|
||||||
### 版本信息
|
### 版本信息
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ func makeVersionMarkdown(version string) string {
|
|||||||
|
|
||||||
// 获取Git最新的版本号
|
// 获取Git最新的版本号
|
||||||
//
|
//
|
||||||
// git log HEAD -1
|
// git log -1
|
||||||
// commit 0460c1b3bb8fbb7e2fc88961e69aa37f4041d6c1
|
// commit 0460c1b3bb8fbb7e2fc88961e69aa37f4041d6c1
|
||||||
// Merge: b2d582a e826457
|
// Merge: b2d582a e826457
|
||||||
// Author: chai2010 <chaishushan{AT}gmail.com>
|
// Author: chai2010 <chaishushan{AT}gmail.com>
|
||||||
@ -57,7 +57,7 @@ func makeVersionMarkdown(version string) string {
|
|||||||
//
|
//
|
||||||
// fix typo
|
// fix typo
|
||||||
func getGitCommitVersion() (version string) {
|
func getGitCommitVersion() (version string) {
|
||||||
cmdOut, err := exec.Command(`git`, `log`, `HEAD`, `-1`).CombinedOutput()
|
cmdOut, err := exec.Command(`git`, `log`, `-1`).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "master"
|
return "master"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user