feat(ios): adapt build to post bintray world (#309)

Part of https://github.com/ooni/probe/issues/1437
This commit is contained in:
Simone Basso 2021-04-08 17:00:51 +02:00 committed by GitHub
commit 85755e35f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 4 deletions

View file

@ -7,3 +7,9 @@ go get -u golang.org/x/mobile/cmd/gomobile
gomobile init
output=MOBILE/ios/oonimkall.framework
gomobile bind -target=ios -o $output -ldflags="-s -w" ./pkg/oonimkall
release=$(git describe --tags)
version=$(date -u +%Y.%m.%d-%H%M%S)
podspecfile=./MOBILE/ios/oonimkall.podspec
(cd ./MOBILE/ios && rm -f oonimkall.framework.zip && zip -yr oonimkall.framework.zip oonimkall.framework)
podspectemplate=./MOBILE/template.podspec
cat $podspectemplate|sed -e "s/@VERSION@/$version/g" -e "s/@RELEASE@/$release/g" > $podspecfile