diff --git a/internal/engine/.github/workflows/ios.yml b/.github/workflows/ios.yml similarity index 81% rename from internal/engine/.github/workflows/ios.yml rename to .github/workflows/ios.yml index a3d998e..ffe3e80 100644 --- a/internal/engine/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -15,4 +15,4 @@ jobs: - run: ./build-ios.bash - run: ./publish-ios.bash env: - BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} + MOBILE_BINTRAY_API_KEY: ${{ secrets.MOBILE_BINTRAY_API_KEY }} diff --git a/MOBILE/ios/.gitignore b/MOBILE/ios/.gitignore index 8b13789..9dc6204 100644 --- a/MOBILE/ios/.gitignore +++ b/MOBILE/ios/.gitignore @@ -1 +1 @@ - +/oonimkall.framework/ diff --git a/internal/engine/build-ios.bash b/build-ios.bash similarity index 77% rename from internal/engine/build-ios.bash rename to build-ios.bash index 71700ff..c1d846b 100755 --- a/internal/engine/build-ios.bash +++ b/build-ios.bash @@ -8,4 +8,4 @@ go get -u golang.org/x/mobile/cmd/gomobile gomobile init export GO111MODULE=on output=MOBILE/ios/oonimkall.framework -gomobile bind -target=ios -o $output -ldflags="-s -w" ./oonimkall +gomobile bind -target=ios -o $output -ldflags="-s -w" ./pkg/oonimkall diff --git a/internal/engine/publish-ios.bash b/publish-ios.bash similarity index 66% rename from internal/engine/publish-ios.bash rename to publish-ios.bash index 8b5a8b3..cc26956 100755 --- a/internal/engine/publish-ios.bash +++ b/publish-ios.bash @@ -10,14 +10,14 @@ podspectemplate=./MOBILE/template.podspec user=bassosimone (cd ./MOBILE/ios && rm -f $pkgname.framework.zip && zip -yr $pkgname.framework.zip $pkgname.framework) cat $podspectemplate|sed "s/@VERSION@/$version/g" > $podspecfile -if [ -z $BINTRAY_API_KEY ]; then - echo "FATAL: missing BINTRAY_API_KEY variable" 1>&2 +if [ -z $MOBILE_BINTRAY_API_KEY ]; then + echo "FATAL: missing MOBILE_BINTRAY_API_KEY variable" 1>&2 exit 1 fi # We currently publish the mobile-staging branch. To cleanup we can fetch all the versions using -# the +# the # query, which returns a list of versions. From such list, we can delete the versions we # don't need using . -curl -sT $frameworkzip -u $user:$BINTRAY_API_KEY $baseurl/$pkgname-$version.framework.zip?publish=1 >/dev/null -curl -sT $podspecfile -u $user:$BINTRAY_API_KEY $baseurl/$pkgname-$version.podspec?publish=1 >/dev/null +curl -sT $frameworkzip -u $user:$MOBILE_BINTRAY_API_KEY $baseurl/$pkgname-$version.framework.zip?publish=1 >/dev/null +curl -sT $podspecfile -u $user:$MOBILE_BINTRAY_API_KEY $baseurl/$pkgname-$version.podspec?publish=1 >/dev/null echo "pod 'oonimkall', :podspec => 'https://dl.bintray.com/ooni/ios/$pkgname-$version.podspec'"