Skip to content

Commit

Permalink
feat: make GitCommitDate as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
chupei committed Jan 13, 2023
1 parent b98b130 commit 98d20e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
*.so

# example binary
examples/examples
examples/examples

# idea
.idea/
5 changes: 4 additions & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ func Print() {

xprintf("Go version", GoVersion)
xprintf("Git commit", GitCommit)
xprintf("Commit date", GitCommitDate)

if GitCommitDate != unknownProperty{
xprintf("Commit date", GitCommitDate)
}

if GitTreeState != unknownProperty {
xprintf("Git state", GitTreeState)
Expand Down

0 comments on commit 98d20e9

Please # to comment.