Skip to content

Commit

Permalink
Merge pull request #46 from iZettle/fastlane-bump-version
Browse files Browse the repository at this point in the history
Add `bump` command to build.sh script
  • Loading branch information
Arikis authored Oct 2, 2018
2 parents 89cb6b6 + 9afc329 commit 5b81cdd
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version> Bumps podspec and xcodeproject to specified version
EOF
}

Expand Down Expand Up @@ -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

0 comments on commit 5b81cdd

Please sign in to comment.