Skip to content

Commit

Permalink
add scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aduryagin committed Sep 29, 2024
1 parent ef51d1c commit 5e2ed0a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
set -ex

gradle assembleSkipRevenuecatXCFramework

cd skip-revenuecat/build/XCFrameworks/release/

rm -f SkipRevenuecat.xcframework.zip
zip -qr SkipRevenuecat.xcframework.zip SkipRevenuecat.xcframework
ls -lah SkipRevenuecat.xcframework.zip
shasum -a 256 SkipRevenuecat.xcframework.zip
16 changes: 16 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -ex

git pull

./scripts/build.sh

LATEST_VERSION=$(git tag -l --sort=-version:refname | grep '[0-9]*\.[0-9]*\.[0-9]*' | head -n 1)
if [ -z "${LATEST_VERSION}" ]; then LATEST_VERSION="0.0.0"; fi

NEW_VERSION=$(semver bump ${SEMVER_BUMP:-patch} ${LATEST_VERSION})

ARTIFACT="skip-revenuecat/build/XCFrameworks/release/SkipRevenuecat.xcframework.zip"

gh release create --notes "$(cat ${ARTIFACT} | shasum -a 256)" ${NEW_VERSION} ${ARTIFACT}

0 comments on commit 5e2ed0a

Please sign in to comment.