From 6815d691eb76671234d81ae4795aaee03cbdd3c6 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Wed, 29 Sep 2021 10:53:44 +0200 Subject: [PATCH] Redo local scripts for remote CI commit-beta - Ensure master branch - Commit beta release to CHANGELOG - Tag locally commit-release - Ensure master branch - Update App Store Connect metadata push-refs - Sync stable with master - Push master - Push tags (trigger CI) --- scripts/commit-beta.sh | 17 +++++++++++++++++ scripts/commit-release.sh | 9 +++++++++ scripts/{push-release.sh => push-refs.sh} | 0 3 files changed, 26 insertions(+) create mode 100755 scripts/commit-release.sh rename scripts/{push-release.sh => push-refs.sh} (100%) diff --git a/scripts/commit-beta.sh b/scripts/commit-beta.sh index bf47e97b..6be085d9 100755 --- a/scripts/commit-beta.sh +++ b/scripts/commit-beta.sh @@ -1,4 +1,21 @@ #!/bin/sh +CURRENT_BRANCH=`git branch --show-current` +if [[ $CURRENT_BRANCH != "master" ]]; then + echo "Not on master branch" + exit +fi + +ci/update-changelog.sh ios +ci/update-changelog.sh mac git add Passepartout/App/*/CHANGELOG.md git add Passepartout/App/*/fastlane/metadata/*/release_notes.txt git commit -m "Set beta release" + +VERSION=`agvtool mvers -terse1` +BUILD=`agvtool vers -terse` + +# predict build number (add commits count) +HISTORY=`git rev-list --count HEAD` +BUILD=$((BUILD + HISTORY)) + +git tag "v$VERSION-b$BUILD" diff --git a/scripts/commit-release.sh b/scripts/commit-release.sh new file mode 100755 index 00000000..5b3cf2bb --- /dev/null +++ b/scripts/commit-release.sh @@ -0,0 +1,9 @@ +#!/bin/sh +CURRENT_BRANCH=`git branch --show-current` +if [[ $CURRENT_BRANCH != "master" ]]; then + echo "Not on master branch" + exit +fi + +ci/update-asc-metadata.sh mac +ci/update-asc-metadata.sh ios diff --git a/scripts/push-release.sh b/scripts/push-refs.sh similarity index 100% rename from scripts/push-release.sh rename to scripts/push-refs.sh