Skip to content

Commit 32d93a7

Browse files
authored
fix: typo CGO_ENABLED instead of GCO_ENABLED (#791)
* fix: use old binary for linux x64 * ci: goreleaser --verbose * FIX: TYPO * revert: static link flags
1 parent 3fe0692 commit 32d93a7

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
distribution: goreleaser
4040
version: '~> v2'
41-
args: release --clean
41+
args: release --clean --verbose
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
with:
7777
distribution: goreleaser
7878
version: '~> v2'
79-
args: release --snapshot --skip=publish --skip=snapcraft --skip=validate --clean
79+
args: release --snapshot --skip=publish --skip=snapcraft --skip=validate --clean --verbose
8080
- name: Tar binaries to preserve executable bit
8181
run: 'tar -cvf lefthook-binaries.tar --directory dist/ $(find dist/ -executable -type f -printf "%P\0" | xargs --null)'
8282
- name: Upload binaries as artifacts

.goreleaser.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ builds:
77
# Builds the binaries without `lefthook upgrade`
88
- id: no_self_update
99
tags:
10-
- osusergo
11-
- netgo
1210
- no_self_update
1311
env:
14-
- GCO_ENABLED=0
12+
- CGO_ENABLED=0
1513
goos:
1614
- linux
1715
- darwin
@@ -31,7 +29,7 @@ builds:
3129
flags:
3230
- -trimpath
3331
ldflags:
34-
- -s -w -extldflags '-static' -X github.com/evilmartians/lefthook/internal/version.commit={{.Commit}}
32+
- -s -w -X github.com/evilmartians/lefthook/internal/version.commit={{.Commit}}
3533

3634
# Full lefthook binary
3735
- id: lefthook
@@ -56,7 +54,7 @@ builds:
5654
flags:
5755
- -trimpath
5856
ldflags:
59-
- -s -w -extldflags '-static' -X github.com/evilmartians/lefthook/internal/version.commit={{.Commit}}
57+
- -s -w -X github.com/evilmartians/lefthook/internal/version.commit={{.Commit}}
6058

6159
archives:
6260
- id: lefthook

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
COMMIT_HASH = $(shell git rev-parse HEAD)
22

33
build:
4-
go build -ldflags "-s -w -extldflags '-static' -X github.com/evilmartians/lefthook/internal/version.commit=$(COMMIT_HASH)" -o lefthook
4+
go build -ldflags "-s -w -X github.com/evilmartians/lefthook/internal/version.commit=$(COMMIT_HASH)" -o lefthook
55

66
build-with-coverage:
7-
go build -cover -ldflags "-s -w extldflags '-static' -X github.com/evilmartians/lefthook/internal/version.commit=$(COMMIT_HASH)" -o lefthook
7+
go build -cover -ldflags "-s -w -X github.com/evilmartians/lefthook/internal/version.commit=$(COMMIT_HASH)" -o lefthook
88

99
install: build
1010
cp lefthook $$(go env GOPATH)/bin

0 commit comments

Comments
 (0)