Skip to content

Commit d0be48f

Browse files
committed
Add LDFLAGS
1 parent 0ed3f58 commit d0be48f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ REPOSITORY = $(shell basename $(PWD))
44
VERSION = $(shell grep "const Version " $(PWD)/version.go | sed -E 's/.*"(.+)"$$/\1/')
55

66
# Build information
7-
DIST_DIR = $(PWD)/dist
8-
ASSETS_DIR = $(DIST_DIR)/$(VERSION)
9-
XC_OS = "linux darwin windows"
10-
XC_ARCH = "386 amd64"
7+
DIST_DIR = $(PWD)/dist
8+
ASSETS_DIR = $(DIST_DIR)/$(VERSION)
9+
XC_OS = "linux darwin windows"
10+
XC_ARCH = "386 amd64"
11+
BUILD_LDFLAGS = "-w -s"
1112

1213
# Tasks
1314
help:
@@ -39,14 +40,14 @@ updatedeps:
3940

4041
dist:
4142
@echo "===> Shipping packages as release assets..."
42-
goxz -d $(ASSETS_DIR) -os $(XC_OS) -arch $(XC_ARCH) -pv $(VERSION) -z
43+
goxz -d=$(ASSETS_DIR) -os=$(XC_OS) -arch=$(XC_ARCH) --build-ldflags=$(BUILD_LDFLAGS) -pv=$(VERSION) -z
4344
pushd $(ASSETS_DIR); \
4445
shasum -a 256 *.zip > ./$(VERSION)_SHA256SUMS; \
4546
popd; \
4647

4748
release:
4849
@echo "===> Publishing to GitHub..."
49-
ghr -u $(OWNER) -r $(REPOSITORY) $(VERSION) $(ASSETS_DIR)
50+
ghr -u=$(OWNER) -r=$(REPOSITORY) $(VERSION) $(ASSETS_DIR)
5051

5152
clean:
5253
@echo "===> Cleaning assets..."

0 commit comments

Comments
 (0)