fix(build.sh): name macOS files after the darwin platform
This was what we used to do in the past. Spotted by @sarathms.
This commit is contained in:
parent
fe89b2454c
commit
770a822fd4
8
.github/workflows/macos.yml
vendored
8
.github/workflows/macos.yml
vendored
|
@ -12,9 +12,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: "1.14"
|
go-version: "1.14"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: ./build.sh macos
|
- run: ./build.sh darwin
|
||||||
- run: ./smoketest.sh ./CLI/macos/amd64/ooniprobe
|
- run: ./smoketest.sh ./CLI/darwin/amd64/ooniprobe
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ooniprobe-macos-amd64
|
name: ooniprobe-darwin-amd64
|
||||||
path: ./CLI/macos/amd64/ooniprobe
|
path: ./CLI/darwin/amd64/ooniprobe
|
||||||
|
|
14
build.sh
14
build.sh
|
@ -26,23 +26,23 @@ case $1 in
|
||||||
go build -tags netgo -ldflags='-s -w -extldflags "-static"' ./cmd/ooniprobe
|
go build -tags netgo -ldflags='-s -w -extldflags "-static"' ./cmd/ooniprobe
|
||||||
;;
|
;;
|
||||||
|
|
||||||
macos)
|
macos|darwin)
|
||||||
# Note! The following line _assumes_ you have a working C compiler. If you
|
# Note! The following line _assumes_ you have a working C compiler. If you
|
||||||
# have Xcode command line tools installed, you are fine.
|
# have Xcode command line tools installed, you are fine.
|
||||||
go build -ldflags='-s -w' ./cmd/ooniprobe
|
go build -ldflags='-s -w' ./cmd/ooniprobe
|
||||||
tar -cvzf ooniprobe_${v}_macos_amd64.tar.gz LICENSE.md Readme.md ooniprobe
|
tar -cvzf ooniprobe_${v}_darwin_amd64.tar.gz LICENSE.md Readme.md ooniprobe
|
||||||
mv ooniprobe ./CLI/macos/amd64/
|
mv ooniprobe ./CLI/darwin/amd64/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
release)
|
release)
|
||||||
$0 linux
|
$0 linux
|
||||||
$0 windows
|
$0 windows
|
||||||
$0 macos
|
$0 darwin
|
||||||
shasum -a 256 ooniprobe_${v}_*_amd64.* > ooniprobe_checksums.txt
|
shasum -a 256 ooniprobe_${v}_*_amd64.* > ooniprobe_checksums.txt
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 linux|macos|windows|release"
|
echo "Usage: $0 darwin|linux|macos|windows|release"
|
||||||
echo ""
|
echo ""
|
||||||
echo "You need a C compiler and Go >= 1.14. The C compiler must be a"
|
echo "You need a C compiler and Go >= 1.14. The C compiler must be a"
|
||||||
echo "UNIX like compiler like GCC, Clang, Mingw-w64."
|
echo "UNIX like compiler like GCC, Clang, Mingw-w64."
|
||||||
|
@ -54,5 +54,9 @@ case $1 in
|
||||||
echo "macOS has never been tested. We have a bunch of cross compiling"
|
echo "macOS has never been tested. We have a bunch of cross compiling"
|
||||||
echo "checks inside the .github/workflows/cross.yml file."
|
echo "checks inside the .github/workflows/cross.yml file."
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "The macos rule is an alias for the darwin rule. The generated"
|
||||||
|
echo "binary file is named ooniprobe_${version}_darwin_${arch}.tar.gz"
|
||||||
|
echo "because the platform name is darwin."
|
||||||
|
echo ""
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue
Block a user