Skip to content

Commit 1e4dc36

Browse files
committed
Explicitly name the default build 'step'
1 parent a800160 commit 1e4dc36

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.goreleaser.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ before:
88

99
builds:
1010
- &BUILD
11+
id: default
1112
env:
1213
- CGO_ENABLED=0
1314
main: ./cmd/step/main.go
1415
flags:
1516
- -trimpath
1617
ldflags:
1718
- -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
19+
gcflags:
20+
- >-
21+
{{- if ne .Env.DEBUG "" }}all=-N -l{{- end }}
1822
targets:
1923
- darwin_amd64
2024
- darwin_arm64
@@ -31,10 +35,6 @@ builds:
3135
- windows_amd64
3236
- windows_arm64
3337
binary: bin/step
34-
-
35-
<< : *BUILD
36-
id: debug
37-
gcflags: all=-N -l
3838
-
3939
# This build is for S3 binaries that follow our naming convention there.
4040
<< : *BUILD
@@ -75,6 +75,7 @@ builds:
7575

7676
archives:
7777
- &ARCHIVE
78+
id: default
7879
# Can be used to change the archive formats for specific GOOSs.
7980
# Most common use case is to archive as zip on Windows.
8081
# Default is empty.
@@ -83,7 +84,7 @@ archives:
8384
- goos: windows
8485
format: zip
8586
builds:
86-
- default
87+
- step
8788
wrap_in_directory: "{{ .ProjectName }}_{{ .Version }}"
8889
files:
8990
- README.md

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ CGO_OVERRIDE?=CGO_ENABLED=0
2323

2424
# which build id in .goreleaser.yml to build
2525
GORELEASER_BUILD_ID?=default
26-
ifdef DEBUG
27-
GORELEASER_BUILD_ID=debug
28-
endif
2926

3027
all: lint test build
3128

@@ -120,8 +117,8 @@ $(PREFIX)/$(BINNAME):
120117

121118
goreleaser:
122119
$Q mkdir -p $(PREFIX)
123-
$Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) goreleaser build \
124-
--id $(GORELEASER_BUILD_ID) \
120+
$Q $(GOOS_OVERRIDE) $(CGO_OVERRIDE) DEBUG=$(DEBUG) goreleaser build \
121+
--id $(GORELEASER_BUILD_ID)
125122
--snapshot \
126123
--single-target \
127124
--clean \

0 commit comments

Comments
 (0)