Skip to content

Commit 5749eb2

Browse files
author
chupei
committed
feat: make GitCommitDate as optional
1 parent b98b130 commit 5749eb2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
*.so
55

66
# example binary
7-
examples/examples
7+
examples/examples
8+
9+
# idea
10+
.idea/

version.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ func Print() {
7373

7474
xprintf("Go version", GoVersion)
7575
xprintf("Git commit", GitCommit)
76-
xprintf("Commit date", GitCommitDate)
76+
77+
if GitCommitDate != unknownProperty {
78+
xprintf("Commit date", GitCommitDate)
79+
}
7780

7881
if GitTreeState != unknownProperty {
7982
xprintf("Git state", GitTreeState)

0 commit comments

Comments
 (0)