diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index ccc4955a7..b9bba840c 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -7,13 +7,18 @@ case "$(uname)" in esac if ! jq --version > /dev/null; then - echo -e "jq is not installed! Should the script install it for you? (y/n) \\c" - read -r REPLY - if [ "$REPLY" = "y" ]; then + if $darwin; then + echo -e "jq is not installed! Should the script install it for you? (y/n) \\c" + read -r REPLY + if [ "$REPLY" = "y" ]; then brew install jq else exit 1 - fi + fi + else + echo >&2 "jq is not installed. Please install it using your platform's package manager (apt-get, yum, pacman, etc.)." + exit 1 + fi fi echo "Checking for any uncommitted changes..." @@ -22,7 +27,7 @@ echo "$CHANGES" if [ ! -z "$CHANGES" ]; then - echo "There are uncommitted changes, either commit it or revert them." + echo "There are uncommitted changes, either commit or revert them." exit 1 fi @@ -38,7 +43,7 @@ FLIPPERKIT_VERSION_TAG='flipperkit_version' OLD_VERSION_POD_ARG=$(< "$FLIPPER_PODSPEC_PATH" grep "$FLIPPERKIT_VERSION_TAG =" ) OLD_VERSION="${OLD_VERSION_POD_ARG##* }" -echo "Currently released version is $OLD_VERSION, What should the version of the next release be?" +echo "The currently released version is $OLD_VERSION. What should the version of the next release be?" read -r VERSION echo "Updating version $VERSION in podspecs, podfiles and in getting started docs..." @@ -62,12 +67,12 @@ fi if [ ! -d "$SPECS_DIR/FlipperKit/" ] # for file "if [-f /home/rama/file]" then - mkdir "$SPECS_DIR/FlipperKit/" + mkdir "$SPECS_DIR/FlipperKit/" fi if [ ! -d "$SPECS_DIR/Flipper/" ] # for file "if [-f /home/rama/file]" then - mkdir "$SPECS_DIR/Flipper/" + mkdir "$SPECS_DIR/Flipper/" fi mkdir "$SPECS_DIR/FlipperKit/$VERSION" # New Specs dir for FlipperKit podspec