From 9afc32968558e55797744903d871fe64bd0535ba Mon Sep 17 00:00:00 2001 From: Said Sikira Date: Tue, 2 Oct 2018 11:18:07 +0200 Subject: [PATCH] Add `bump` command to build.sh script --- build.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index f26da4f..c3d6f47 100644 --- a/build.sh +++ b/build.sh @@ -15,14 +15,17 @@ cat << EOF Usage: sh $0 command [Building] - iOS Build iOS framework - examples Build examples - clean Clean up all un-neccesary files + iOS Build iOS framework + examples Build examples + clean Clean up all un-neccesary files [Testing] - test-iOS Run tests on iOS host - test-native Run tests using `swift test` + test-iOS Run tests on iOS host + test-native Run tests using `swift test` + + [Release] + bump Bumps podspec and xcodeproject to specified version EOF } @@ -78,11 +81,26 @@ case "$COMMAND" in ;; "test-native") - swift package clean + swift package clean swift build swift test exit 0; ;; + + "bump") + VERSION="$2" + + if [ -z $VERSION ] + then + echo "Version parameter is not set. \nExample: sh build.sh bump 1.3.0" + exit 0; + fi + + fastlane run version_bump_podspec version_number:$VERSION + fastlane run increment_version_number version_number:$VERSION + + exit 0; + ;; esac usage