Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Feb 20, 2024
2 parents 4f4c140 + dd4eda6 commit 18df193
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/ios/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function last_tag() {
local out=`git tag --sort=taggerdate | tail -1`
echo $out
}
echo "🚒 🏷️ Last tag: $(last_tag)"
echo "🚒 🏷️ Last tag: $(last_tag)"

# one liner from: https://stackoverflow.com/a/8653732
NEXT_TAG=$(echo $(last_tag) | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')
Expand All @@ -37,8 +37,16 @@ XCFRAME_ZIP_PATH=`echo "$OUTPUT_OF_BUILD" | cut -d ";" -f 2` || exit $?
echo "🚒 CHECKSUM: $CHECKSUM"
echo "🚒 XCFRAME_ZIP_PATH: $XCFRAME_ZIP_PATH"

GIT_ADD_CMD="git add Package.swift apple/Sources/UniFFI/Sargon.swift"
echo "🚒 Staging (potentially) changed files with: $GIT_ADD_CMD"
eval $GIT_ADD_CMD

GIT_COMMIT_CMD="git commit -m \"Release of '$NEXT_TAG' (updated Package.swift with new checksum and path to zip on Github, and maybe apple/Sources/UniFFI/Sargon.swift). This commit is not merged into main/develop branch (and need not be).\" --no-verify"
echo "🚒 Git commiting changes to Package.swift (and maybe Sargon.swift)"
eval $GIT_COMMIT_CMD

`git tag $NEXT_TAG`
echo "🚒 🏷️ πŸ“‘ Pushing tag: $(last_tag)"
echo "🚒 🏷️ πŸ“‘ Pushing tag: $(NEXT_TAG), but only tag, not commit."
`git push origin $NEXT_TAG`

# This MUST match whatever you we have declared in `$PROJECT_ROOT/Package.swift`
Expand Down

0 comments on commit 18df193

Please sign in to comment.