diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 72b3941..24991d7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,9 +12,9 @@ jobs: with: go-version: "1.14" - uses: actions/checkout@v2 - - run: ./build.sh macos - - run: ./smoketest.sh ./CLI/macos/amd64/ooniprobe + - run: ./build.sh darwin + - run: ./smoketest.sh ./CLI/darwin/amd64/ooniprobe - uses: actions/upload-artifact@v1 with: - name: ooniprobe-macos-amd64 - path: ./CLI/macos/amd64/ooniprobe + name: ooniprobe-darwin-amd64 + path: ./CLI/darwin/amd64/ooniprobe diff --git a/CLI/macos/amd64/.gitignore b/CLI/darwin/amd64/.gitignore similarity index 100% rename from CLI/macos/amd64/.gitignore rename to CLI/darwin/amd64/.gitignore diff --git a/build.sh b/build.sh index 2f1e0db..ee5ef49 100755 --- a/build.sh +++ b/build.sh @@ -26,23 +26,23 @@ case $1 in 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 # have Xcode command line tools installed, you are fine. go build -ldflags='-s -w' ./cmd/ooniprobe - tar -cvzf ooniprobe_${v}_macos_amd64.tar.gz LICENSE.md Readme.md ooniprobe - mv ooniprobe ./CLI/macos/amd64/ + tar -cvzf ooniprobe_${v}_darwin_amd64.tar.gz LICENSE.md Readme.md ooniprobe + mv ooniprobe ./CLI/darwin/amd64/ ;; release) $0 linux $0 windows - $0 macos + $0 darwin 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 "You need a C compiler and Go >= 1.14. The C compiler must be a" 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 "checks inside the .github/workflows/cross.yml file." 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