Update release script to accomodate name change
Summary: As per the title Reviewed By: danielbuechele Differential Revision: D10050043 fbshipit-source-id: 7e3744fd9d2224456515cfa7187faebbf1541fa6
This commit is contained in:
committed by
Facebook Github Bot
parent
3699a0667a
commit
ddcc74edb8
@@ -30,12 +30,12 @@ echo "✨ Making a new release..."
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
SONAR_DIR="$DIR/../"
|
||||
SONARKIT_PODSPEC_PATH="$SONAR_DIR/iOS/SonarKit.podspec"
|
||||
SONAR_PODSPEC_PATH="$SONAR_DIR/xplat/Sonar/Sonar.podspec"
|
||||
FLIPPERKIT_PODSPEC_PATH="$SONAR_DIR/iOS/FlipperKit.podspec"
|
||||
FLIPPER_PODSPEC_PATH="$SONAR_DIR/xplat/Flipper/Flipper.podspec"
|
||||
SONAR_GETTING_STARTED_DOC="$SONAR_DIR/docs/getting-started.md"
|
||||
SPECS_DIR="$SONAR_DIR/Specs/"
|
||||
SONARKIT_VERSION_TAG='sonarkit_version'
|
||||
OLD_VERSION_POD_ARG=$(< "$SONAR_PODSPEC_PATH" grep "$SONARKIT_VERSION_TAG =" )
|
||||
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?"
|
||||
@@ -44,27 +44,38 @@ read -r VERSION
|
||||
echo "Updating version $VERSION in podspecs, podfiles and in getting started docs..."
|
||||
|
||||
# Update Podspec files and podfiles with correct version
|
||||
echo "Updating $SONARKIT_PODSPEC_PATH"
|
||||
echo "Updating $FLIPPERKIT_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"
|
||||
sed -i '' "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_PODSPEC_PATH"
|
||||
sed -i '' "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$FLIPPERKIT_PODSPEC_PATH"
|
||||
echo "Updating $FLIPPER_PODSPEC_PATH"
|
||||
sed -i '' "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$FLIPPER_PODSPEC_PATH"
|
||||
echo "Updating $SONAR_GETTING_STARTED_DOC"
|
||||
sed -i '' "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_GETTING_STARTED_DOC"
|
||||
sed -i '' "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_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"
|
||||
sed -i "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$FLIPPERKIT_PODSPEC_PATH"
|
||||
echo "Updating $FLIPPER_PODSPEC_PATH"
|
||||
sed -i "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$FLIPPER_PODSPEC_PATH"
|
||||
echo "Updating $SONAR_GETTING_STARTED_DOC"
|
||||
sed -i "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_GETTING_STARTED_DOC"
|
||||
sed -i "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$SONAR_GETTING_STARTED_DOC"
|
||||
fi
|
||||
# Copy Podfiles
|
||||
mkdir "$SPECS_DIR/SonarKit/$VERSION" # New Specs dir for SonarKit podspec
|
||||
mkdir "$SPECS_DIR/Sonar/$VERSION" # New Specs dir for Sonar podspec
|
||||
echo "Copying SonarKit.podspec in Specs folder"
|
||||
cp "$SONARKIT_PODSPEC_PATH" "$SPECS_DIR/SonarKit/$VERSION" # Copied SonarKit podspec
|
||||
echo "Copying Sonar.podspec in Specs folder"
|
||||
cp "$SONAR_PODSPEC_PATH" "$SPECS_DIR/Sonar/$VERSION" # Copied Sonar podspec
|
||||
|
||||
if [ ! -d "$SPECS_DIR/FlipperKit/" ] # for file "if [-f /home/rama/file]"
|
||||
then
|
||||
mkdir "$SPECS_DIR/FlipperKit/"
|
||||
fi
|
||||
|
||||
if [ ! -d "$SPECS_DIR/Flipper/" ] # for file "if [-f /home/rama/file]"
|
||||
then
|
||||
mkdir "$SPECS_DIR/Flipper/"
|
||||
fi
|
||||
|
||||
mkdir "$SPECS_DIR/FlipperKit/$VERSION" # New Specs dir for FlipperKit podspec
|
||||
mkdir "$SPECS_DIR/Flipper/$VERSION" # New Specs dir for Flipper podspec
|
||||
echo "Copying FlipperKit.podspec in Specs folder"
|
||||
cp "$FLIPPERKIT_PODSPEC_PATH" "$SPECS_DIR/FlipperKit/$VERSION" # Copied FlipperKit podspec
|
||||
echo "Copying Flipper.podspec in Specs folder"
|
||||
cp "$FLIPPER_PODSPEC_PATH" "$SPECS_DIR/Flipper/$VERSION" # Copied Flipper podspec
|
||||
|
||||
echo "Bumping version number for android related files..."
|
||||
# Update Android related files
|
||||
|
||||
Reference in New Issue
Block a user