chmod script
Summary: Fixes chmod and mac os script error and also tests if jq is installed Reviewed By: passy Differential Revision: D9789391 fbshipit-source-id: 11319539d4f511294f216860497bf0e67ee1af08
This commit is contained in:
committed by
Facebook Github Bot
parent
20748876a9
commit
41d5efeeec
30
scripts/bump-version.sh
Normal file → Executable file
30
scripts/bump-version.sh
Normal file → Executable file
@@ -6,14 +6,17 @@ case "$(uname)" in
|
|||||||
Darwin*) darwin=true ;;
|
Darwin*) darwin=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if $darwin; then
|
if ! jq --version > /dev/null; then
|
||||||
sedi="sed -i ''"
|
echo -e "jq is not installed! Should the script install it for you? (y/n) \\c"
|
||||||
else
|
read -r REPLY
|
||||||
sedi="sed -i"
|
if [ "$REPLY" = "y" ]; then
|
||||||
|
brew install jq
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Checking for any uncommited changes..."
|
echo "Checking for any uncommitted changes..."
|
||||||
|
|
||||||
CHANGES=$(hg st)
|
CHANGES=$(hg st)
|
||||||
echo "$CHANGES"
|
echo "$CHANGES"
|
||||||
|
|
||||||
@@ -42,12 +45,19 @@ echo "Updating version $VERSION in podspecs, podfiles and in getting started doc
|
|||||||
|
|
||||||
# Update Podspec files and podfiles with correct version
|
# Update Podspec files and podfiles with correct version
|
||||||
echo "Updating $SONARKIT_PODSPEC_PATH"
|
echo "Updating $SONARKIT_PODSPEC_PATH"
|
||||||
$sedi "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONARKIT_PODSPEC_PATH"
|
if $darwin; then
|
||||||
|
sed -i '' "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONARKIT_PODSPEC_PATH"
|
||||||
echo "Updating $SONAR_PODSPEC_PATH"
|
echo "Updating $SONAR_PODSPEC_PATH"
|
||||||
$sedi "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_PODSPEC_PATH"
|
sed -i '' "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_PODSPEC_PATH"
|
||||||
echo "Updating $SONAR_GETTING_STARTED_DOC"
|
echo "Updating $SONAR_GETTING_STARTED_DOC"
|
||||||
$sedi "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_GETTING_STARTED_DOC"
|
sed -i '' "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_GETTING_STARTED_DOC"
|
||||||
|
else
|
||||||
|
sed -i "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONARKIT_PODSPEC_PATH"
|
||||||
|
echo "Updating $SONAR_PODSPEC_PATH"
|
||||||
|
sed -i "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_PODSPEC_PATH"
|
||||||
|
echo "Updating $SONAR_GETTING_STARTED_DOC"
|
||||||
|
sed -i "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_GETTING_STARTED_DOC"
|
||||||
|
fi
|
||||||
# Copy Podfiles
|
# Copy Podfiles
|
||||||
mkdir "$SPECS_DIR/SonarKit/$VERSION" # New Specs dir for SonarKit podspec
|
mkdir "$SPECS_DIR/SonarKit/$VERSION" # New Specs dir for SonarKit podspec
|
||||||
mkdir "$SPECS_DIR/Sonar/$VERSION" # New Specs dir for Sonar podspec
|
mkdir "$SPECS_DIR/Sonar/$VERSION" # New Specs dir for Sonar podspec
|
||||||
|
|||||||
Reference in New Issue
Block a user