Skip to content

Commit

Permalink
fix: adds GitTag to build script
Browse files Browse the repository at this point in the history
  • Loading branch information
vpominchuk committed Oct 31, 2023
1 parent d462228 commit 28689f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ fi
[ -f $EXECUTABLE_NAME ] && rm $EXECUTABLE_NAME

go build \
-ldflags "-X 'github.com/vpominchuk/$APP_NAME/src/app.ExecutableName=$APP_NAME' -X 'github.com/vpominchuk/$APP_NAME/src/app.GitCommit=`git rev-list --count HEAD`'" \
-ldflags "-X 'github.com/vpominchuk/$APP_NAME/src/app.ExecutableName=$APP_NAME' \
-X 'github.com/vpominchuk/$APP_NAME/src/app.GitCommit=`git rev-list --count HEAD`' \
-X 'github.com/vpominchuk/$APP_NAME/src/app.GitTag=`git describe --tags $(git rev-list --tags --max-count=1)`'" \
-o $EXECUTABLE_NAME

0 comments on commit 28689f5

Please sign in to comment.