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:
Pritesh Nandgaonkar
2018-09-26 06:50:27 -07:00
committed by Facebook Github Bot
parent 3699a0667a
commit ddcc74edb8
3 changed files with 37 additions and 26 deletions

View File

@@ -1,17 +1,17 @@
folly_compiler_flags = '-DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0' folly_compiler_flags = '-DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0'
yoga_version = '~> 1.9' yoga_version = '~> 1.9'
yogakit_version = '~>1.8' yogakit_version = '~>1.8'
sonarkit_version = '0.7.2' flipperkit_version = '0.7.2'
Pod::Spec.new do |spec| Pod::Spec.new do |spec|
spec.name = 'FlipperKit' spec.name = 'FlipperKit'
spec.version = sonarkit_version spec.version = flipperkit_version
spec.license = { :type => 'MIT' } spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/facebook/Sonar' spec.homepage = 'https://github.com/facebook/Sonar'
spec.summary = 'Sonar iOS podspec' spec.summary = 'Sonar iOS podspec'
spec.authors = 'Facebook' spec.authors = 'Facebook'
spec.static_framework = true spec.static_framework = true
spec.source = { :git => 'https://github.com/facebook/Sonar.git', spec.source = { :git => 'https://github.com/facebook/Sonar.git',
:tag=> "v"+sonarkit_version } :tag=> "v"+flipperkit_version }
spec.module_name = 'FlipperKit' spec.module_name = 'FlipperKit'
spec.platforms = { :ios => "8.4" } spec.platforms = { :ios => "8.4" }
spec.default_subspecs = "Core" spec.default_subspecs = "Core"
@@ -51,7 +51,7 @@ Pod::Spec.new do |spec|
ss.dependency 'FlipperKit/FBCxxUtils' ss.dependency 'FlipperKit/FBCxxUtils'
ss.dependency 'FlipperKit/CppBridge' ss.dependency 'FlipperKit/CppBridge'
ss.dependency 'Folly', '~>1.1' ss.dependency 'Folly', '~>1.1'
ss.dependency 'Flipper', '~>'+sonarkit_version ss.dependency 'Flipper', '~>'+flipperkit_version
ss.dependency 'CocoaAsyncSocket', '~> 7.6' ss.dependency 'CocoaAsyncSocket', '~> 7.6'
ss.dependency 'PeerTalk', '~>0.0.2' ss.dependency 'PeerTalk', '~>0.0.2'
ss.dependency 'OpenSSL-Static', '1.0.2.c1' ss.dependency 'OpenSSL-Static', '1.0.2.c1'

View File

@@ -30,12 +30,12 @@ echo "✨ Making a new release..."
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SONAR_DIR="$DIR/../" SONAR_DIR="$DIR/../"
SONARKIT_PODSPEC_PATH="$SONAR_DIR/iOS/SonarKit.podspec" FLIPPERKIT_PODSPEC_PATH="$SONAR_DIR/iOS/FlipperKit.podspec"
SONAR_PODSPEC_PATH="$SONAR_DIR/xplat/Sonar/Sonar.podspec" FLIPPER_PODSPEC_PATH="$SONAR_DIR/xplat/Flipper/Flipper.podspec"
SONAR_GETTING_STARTED_DOC="$SONAR_DIR/docs/getting-started.md" SONAR_GETTING_STARTED_DOC="$SONAR_DIR/docs/getting-started.md"
SPECS_DIR="$SONAR_DIR/Specs/" SPECS_DIR="$SONAR_DIR/Specs/"
SONARKIT_VERSION_TAG='sonarkit_version' FLIPPERKIT_VERSION_TAG='flipperkit_version'
OLD_VERSION_POD_ARG=$(< "$SONAR_PODSPEC_PATH" grep "$SONARKIT_VERSION_TAG =" ) OLD_VERSION_POD_ARG=$(< "$FLIPPER_PODSPEC_PATH" grep "$FLIPPERKIT_VERSION_TAG =" )
OLD_VERSION="${OLD_VERSION_POD_ARG##* }" OLD_VERSION="${OLD_VERSION_POD_ARG##* }"
echo "Currently released version is $OLD_VERSION, What should the version of the next release be?" 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..." echo "Updating version $VERSION in podspecs, podfiles and in getting started docs..."
# Update Podspec files and podfiles with correct version # Update Podspec files and podfiles with correct version
echo "Updating $SONARKIT_PODSPEC_PATH" echo "Updating $FLIPPERKIT_PODSPEC_PATH"
if $darwin; then if $darwin; then
sed -i '' "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONARKIT_PODSPEC_PATH" sed -i '' "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$FLIPPERKIT_PODSPEC_PATH"
echo "Updating $SONAR_PODSPEC_PATH" echo "Updating $FLIPPER_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}'/" "$FLIPPER_PODSPEC_PATH"
echo "Updating $SONAR_GETTING_STARTED_DOC" 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 else
sed -i "s/${SONARKIT_VERSION_TAG} = ${OLD_VERSION}/${SONARKIT_VERSION_TAG} = '${VERSION}'/" "$SONARKIT_PODSPEC_PATH" sed -i "s/${FLIPPERKIT_VERSION_TAG} = ${OLD_VERSION}/${FLIPPERKIT_VERSION_TAG} = '${VERSION}'/" "$FLIPPERKIT_PODSPEC_PATH"
echo "Updating $SONAR_PODSPEC_PATH" echo "Updating $FLIPPER_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}'/" "$FLIPPER_PODSPEC_PATH"
echo "Updating $SONAR_GETTING_STARTED_DOC" 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 fi
# Copy Podfiles # Copy Podfiles
mkdir "$SPECS_DIR/SonarKit/$VERSION" # New Specs dir for SonarKit podspec
mkdir "$SPECS_DIR/Sonar/$VERSION" # New Specs dir for Sonar podspec if [ ! -d "$SPECS_DIR/FlipperKit/" ] # for file "if [-f /home/rama/file]"
echo "Copying SonarKit.podspec in Specs folder" then
cp "$SONARKIT_PODSPEC_PATH" "$SPECS_DIR/SonarKit/$VERSION" # Copied SonarKit podspec mkdir "$SPECS_DIR/FlipperKit/"
echo "Copying Sonar.podspec in Specs folder" fi
cp "$SONAR_PODSPEC_PATH" "$SPECS_DIR/Sonar/$VERSION" # Copied Sonar podspec
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..." echo "Bumping version number for android related files..."
# Update Android related files # Update Android related files

View File

@@ -1,13 +1,13 @@
sonarkit_version = '0.7.2' flipperkit_version = '0.7.2'
Pod::Spec.new do |spec| Pod::Spec.new do |spec|
spec.name = 'Flipper' spec.name = 'Flipper'
spec.version = sonarkit_version spec.version = flipperkit_version
spec.license = { :type => 'MIT' } spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/facebook/sonar' spec.homepage = 'https://github.com/facebook/sonar'
spec.summary = 'SonarKit core cpp code with network implementation' spec.summary = 'SonarKit core cpp code with network implementation'
spec.authors = 'Facebook' spec.authors = 'Facebook'
spec.source = { :git => 'https://github.com/facebook/Sonar.git', spec.source = { :git => 'https://github.com/facebook/Sonar.git',
:tag => 'v'+sonarkit_version } :tag => 'v'+flipperkit_version }
spec.module_name = 'Flipper' spec.module_name = 'Flipper'
spec.public_header_files = 'xplat/Flipper/*.h' spec.public_header_files = 'xplat/Flipper/*.h'
spec.source_files = 'xplat/Flipper/*.{h,cpp,m,mm}' spec.source_files = 'xplat/Flipper/*.{h,cpp,m,mm}'