Skip to content

Commit

Permalink
feat(ios): adapt build to post bintray world (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone authored Apr 8, 2021
1 parent f5d0a1f commit 85755e3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions MOBILE/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/oonimkall.framework/
/oonimkall.*
6 changes: 3 additions & 3 deletions MOBILE/template.podspec
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion MOBILE/template.pom
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 6 additions & 0 deletions build-ios.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 85755e3

Please sign in to comment.