Skip to content

Commit 06a0e62

Browse files
committed
fix(deployment): statically link glibc
Close #8
1 parent 36c300a commit 06a0e62

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ _cgo_export.*
3030
*.out
3131
_testmain.go
3232

33-
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
34-
.glide/
33+
go.work
3534

3635
vendor/
3736
deploy/

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ tmpfolder: ## Create the temporary folder.
5454
.PHONY: linux
5555
linux: tmpfolder
5656
linux: ## Build for GNU/Linux.
57-
@GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o $(DEPLOY_FOLDER)/$(RELEADE_NAME) .
57+
@GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o $(DEPLOY_FOLDER)/$(RELEADE_NAME) .
5858
@tar -czf $(DEPLOY_FOLDER)/figurine_linux_$(TARGET).tar.gz $(DEPLOY_FOLDER)/$(RELEADE_NAME)
5959
@cd $(DEPLOY_FOLDER) ; sha256sum figurine_linux_$(TARGET).tar.gz >> $(CHECKSUM_FILE)
6060
@echo "Linux target:" $(DEPLOY_FOLDER)/figurine_linux_$(TARGET).tar.gz
@@ -63,7 +63,7 @@ linux: ## Build for GNU/Linux.
6363
.PHONY: darwin
6464
darwin: tmpfolder
6565
darwin: ## Build for Mac.
66-
@GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o $(DEPLOY_FOLDER)/$(RELEADE_NAME) .
66+
@GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o $(DEPLOY_FOLDER)/$(RELEADE_NAME) .
6767
@tar -czf $(DEPLOY_FOLDER)/figurine_darwin_$(TARGET).tar.gz $(DEPLOY_FOLDER)/$(RELEADE_NAME)
6868
@cd $(DEPLOY_FOLDER) ; sha256sum figurine_darwin_$(TARGET).tar.gz >> $(CHECKSUM_FILE)
6969
@echo "Darwin target:" $(DEPLOY_FOLDER)/figurine_darwin_$(TARGET).tar.gz
@@ -72,7 +72,7 @@ darwin: ## Build for Mac.
7272
.PHONY: windows
7373
windows: tmpfolder
7474
windows: ## Build for windoze.
75-
@GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o $(DEPLOY_FOLDER)/$(RELEADE_NAME).exe .
75+
@GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o $(DEPLOY_FOLDER)/$(RELEADE_NAME).exe .
7676
@zip -r $(DEPLOY_FOLDER)/figurine_windows_$(TARGET).zip $(DEPLOY_FOLDER)/$(RELEADE_NAME).exe
7777
@cd $(DEPLOY_FOLDER) ; sha256sum figurine_windows_$(TARGET).zip >> $(CHECKSUM_FILE)
7878
@echo "Windows target:" $(DEPLOY_FOLDER)/figurine_windows_$(TARGET).zip
@@ -82,15 +82,14 @@ windows: ## Build for windoze.
8282
release: ## Create releases for Linux, Mac, and windoze.
8383
release: tmpfolder linux darwin windows
8484

85-
8685
.PHONY: coverage
8786
coverage: ## Show the test coverage on browser.
8887
go test -covermode=count -coverprofile=coverage.out ./...
8988
go tool cover -func=coverage.out | tail -n 1
9089
go tool cover -html=coverage.out
9190

9291
.PHONY: audit
93-
audit:
92+
audit: ## Audit the code for updates, vulnerabilities and binary weight.
9493
go list -u -m -json all | go-mod-outdated -update -direct
9594
go list -json -m all | nancy sleuth
9695
goweight | head -n 20

0 commit comments

Comments
 (0)