Skip to content

Commit 0d10368

Browse files
fix dirty commits (#2102)
1 parent 265a257 commit 0d10368

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
run: |
102102
mkdir dist out
103103
cp LICENSE dist/LICENSE.txt
104-
go build -o dist/ -ldflags "-s -w -X $(go list -m)/version.GitCommit=$(git rev-parse --short HEAD)" .
104+
go build -buildvcs=false -o dist/ -ldflags "-s -w -X $(go list -m)/version.GitCommit=$(git rev-parse --short HEAD)" .
105105
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
106106
107107
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -144,7 +144,7 @@ jobs:
144144
run: |
145145
mkdir dist out
146146
cp LICENSE dist/LICENSE.txt
147-
go build -o dist/ -ldflags "-s -w -X $(go list -m)/version.GitCommit=$(git rev-parse --short HEAD)" .
147+
go build -buildvcs=false -o dist/ -ldflags "-s -w -X $(go list -m)/version.GitCommit=$(git rev-parse --short HEAD)" .
148148
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
149149
150150
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
/vendor
55
consul-template
66

7+
### Build artifacts that can make git status dirty
8+
dist/LICENSE
9+
dist/LICENSE.txt
10+
*.zip
11+
out/
12+
713
### Golang ###
814
# Compiled Object files, Static and Dynamic libs (Shared Objects)
915
*.o

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dev:
3939

4040
# dev docker builds
4141
docker:
42-
@env CGO_ENABLED="0" go build -ldflags "${LD_FLAGS}" -o $(NAME)
42+
@env CGO_ENABLED="0" go build -buildvcs=false -ldflags "${LD_FLAGS}" -o $(NAME)
4343
mkdir -p dist/linux/amd64/
4444
cp consul-template dist/linux/amd64/
4545
env DOCKER_BUILDKIT=1 docker build -t consul-template .

0 commit comments

Comments
 (0)