-
-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
Signed-off-by: Alex Ellis <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
k3sup | ||
bin/** |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Version := $(shell git describe --tags --dirty) | ||
GitCommit := $(shell git rev-parse HEAD) | ||
LDFLAGS := "-s -w -X main.Version=$(Version) -X main.GitCommit=$(GitCommit)" | ||
PLATFORM := $(shell ./hack/platform-tag.sh) | ||
|
||
.PHONY: all | ||
|
||
.PHONY: dist | ||
dist: | ||
mkdir -p bin | ||
CGO_ENABLED=0 GOOS=linux go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/k3sup | ||
CGO_ENABLED=0 GOOS=darwin go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/k3sup-darwin | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/k3sup-armhf | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/k3sup-arm64 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
getPackage() { | ||
suffix="" | ||
arch=$(uname -m) | ||
case $arch in | ||
"aarch64") | ||
suffix="-arm64" | ||
;; | ||
esac | ||
case $arch in | ||
"armv6l" | "armv7l") | ||
suffix="-armhf" | ||
;; | ||
esac | ||
} | ||
|
||
getPackage | ||
echo ${suffix} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.