Skip to content

Commit 3d32ad0

Browse files
authored
Add fallback to commit ID when version tag is missing (#7)
1 parent 6acc722 commit 3d32ad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/protodec.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require "./protodec/utils"
1919

2020
CURRENT_BRANCH = {{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}
2121
CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
22-
CURRENT_VERSION = {{ "#{`git describe --tags --abbrev=0`.strip}" }}
22+
CURRENT_VERSION = {{ "#{`git describe --always --tags --abbrev=0`.strip}" }}
2323

2424
SOFTWARE = {
2525
"name" => "protodec",

0 commit comments

Comments
 (0)