Skip to content

Commit

Permalink
wip release script
Browse files Browse the repository at this point in the history
  • Loading branch information
CyonAlexRDX committed Feb 16, 2024
1 parent aefd2d3 commit 7f5f5f4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/ios/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,20 @@ DIR="$( cd "$( dirname "$REL_DIR" )" && pwd )";


ZIP_PATH=$(sh $DIR/build-sargon.sh --release | tail -n 1)
`git fetch --prune --tags`
function last_tag() {
local out=`git tag --sort=taggerdate | tail -1`
echo $out
}
echo "🔮 Last tag: $(last_tag)"

gh release
# 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}')

`git tag $NEXT_TAG`
echo "🔮 Last tag: $(last_tag)"
RELEASE_CMD="gh release create $NEXT_TAG $ZIP_PATH"
echo "📦 will now run command: '$RELEASE_CMD'"
eval $RELEASE_CMD

echo "End of script ✅"

0 comments on commit 7f5f5f4

Please sign in to comment.