Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build glidergun for arm/arm64/amd64 platforms where appropriate #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@ SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
VERSION=0.1.0

build: src
mkdir -p build/Linux && GOOS=linux CGO_ENABLED=0 go build -a \
mkdir -p build/linux-arm && GOOS=linux GOARCH=arm CGO_ENABLED=0 go build -a \
-installsuffix cgo \
-ldflags "-X main.Version=$(VERSION)" \
-o build/Linux/$(BINARYNAME)
mkdir -p build/Darwin && GOOS=darwin CGO_ENABLED=0 go build -a \
-o build/linux-arm/$(BINARYNAME)
mkdir -p build/linux-arm64 && GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -a \
-installsuffix cgo \
-ldflags "-X main.Version=$(VERSION)" \
-o build/Darwin/$(BINARYNAME)
-o build/linux-arm64/$(BINARYNAME)
mkdir -p build/linux-amd64 && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a \
-installsuffix cgo \
-ldflags "-X main.Version=$(VERSION)" \
-o build/linux-amd64/$(BINARYNAME)
mkdir -p build/darwin-arm64 && GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -a \
-installsuffix cgo \
-ldflags "-X main.Version=$(VERSION)" \
-o build/darwin-arm64/$(BINARYNAME)
mkdir -p build/darwin-amd64 && GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -a \
-installsuffix cgo \
-ldflags "-X main.Version=$(VERSION)" \
-o build/darwin-amd64/$(BINARYNAME)

test: src
go install
Expand All @@ -37,8 +49,11 @@ gh-release:

release:
rm -rf release && mkdir release
tar -zcf release/$(NAME)_$(VERSION)_Linux_$(HARDWARE).tgz -C build/Linux $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_Darwin_$(HARDWARE).tgz -C build/Darwin $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_linux_arm.tgz -C build/linux-arm $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_linux_arm64.tgz -C build/linux-arm64 $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_linux_amd64.tgz -C build/linux-amd64 $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_darwin_arm64.tgz -C build/darwin-arm64 $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_darwin_amd64.tgz -C build/darwin-amd64 $(BINARYNAME)
gh-release checksums sha256
gh-release create $(OWNER)/$(NAME) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) v$(VERSION)

Expand Down