Added helper scripts that will lock and unlock changes to version.go.
This commit is contained in:
3
ignore-changes-to-version-go.sh
Executable file
3
ignore-changes-to-version-go.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git update-index --assume-unchanged version.go
|
7
set-version.sh
Executable file
7
set-version.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||||
|
# Allow git to track changes to version.go
|
||||||
|
git update-index --no-assume-unchanged version.go
|
||||||
|
# Hardcode the version into main.go
|
||||||
|
sed -i '' "s/^var Version = .*/var Version = \"$VERSION\"/" version.go
|
Reference in New Issue
Block a user