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
parent f5d0a1fa1a
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

@ -1 +1,2 @@
/oonimkall.framework/
/oonimkall.*

View File

@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = "oonimkall"
s.version = "@VERSION@"
s.summary = "OONI Probe Engine for iOS"
s.summary = "OONI Probe Library for iOS"
s.author = "Simone Basso"
s.homepage = "https://github.com/ooni/probe-engine"
s.homepage = "https://github.com/ooni/probe-cli"
s.license = { :type => "BSD" }
s.source = {
:http => "https://dl.bintray.com/ooni/ios/oonimkall-@VERSION@.framework.zip"
:http => "https://github.com/ooni/probe-cli/releases/download/@RELEASE@/oonimkall.framework.zip"
}
s.platform = :ios, "9.0"
s.ios.vendored_frameworks = "oonimkall.framework"

View File

@ -9,7 +9,7 @@
<packaging>aar</packaging>
<name>oonimkall</name>
<description>OONI Probe for Android</description>
<description>OONI Probe Library for Android</description>
<url>https://github.com/ooni/probe-cli</url>
<licenses>

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