Merge pull request #150 from ooni/fix/buildscript

Release v3.0.7-beta.1 with updated build script
This commit is contained in:
Simone Basso 2020-08-24 19:31:07 +02:00 committed by GitHub
commit b18a106698
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -3,5 +3,5 @@ package version
const (
// Version is the software version
Version = "3.0.7-beta"
Version = "3.0.7-beta.1"
)