This repository was archived by the owner on Jan 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed
Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1616 with :
1717 fetch-depth : 1
1818
19- - run : make test dist hash
19+ - run : make test dist
2020
2121 - uses : skx/github-action-publish-binaries@master
2222 env :
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ SHELL := bash
22LDFLAGS := "-s -w"
33.PHONY : all
44
5+ .PHONY : % .zip
6+ % .zip :
7+ touch $@
8+
59.PHONY : test
610test :
711 go test ./...
@@ -13,12 +17,9 @@ build:
1317.PHONY : dist
1418dist :
1519 mkdir -p dist
16- GOOS=linux go build -ldflags $(LDFLAGS ) -o dist/do-droplets
17- GOOS=darwin go build -ldflags $(LDFLAGS ) -o dist/do-droplets-darwin
18- GOOS=linux GOARCH=arm GOARM=6 go build -ldflags $(LDFLAGS ) -o dist/do-droplets-armhf
19- GOOS=linux GOARCH=arm64 go build -ldflags $(LDFLAGS ) -o dist/do-droplets-arm64
20- GOOS=windows go build -ldflags $(LDFLAGS ) -o dist/do-droplets.exe
21-
22- .PHONY : hash
23- hash :
24- for f in dist/do-droplets* ; do shasum -a 256 $$ f > $$ f.sha256; done
20+ ./scripts/dist.sh linux amd64
21+ ./scripts/dist.sh linux arm64
22+ ./scripts/dist.sh linux arm
23+ ./scripts/dist.sh darwin amd64
24+ ./scripts/dist.sh windows amd64
25+ cd dist && shasum -a 256 * .zip > do-droplets_SHA256SUMS && cd ..
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ suffix=" "
4+ if [ $1 == " windows" ]; then
5+ suffix=" .exe"
6+ fi
7+
8+ GOOS=$1 GOARCH=$2 go build -ldflags " -s -w" -o " dist/do-droplets${suffix} "
9+ zip -j dist/do-droplets_$1 _$2 .zip " dist/do-droplets${suffix} "
10+ rm -rf " dist/do-droplets${suffix} "
You can’t perform that action at this time.
0 commit comments