From 43d62ef808eaf0f657114174c6af731e47e00bf4 Mon Sep 17 00:00:00 2001 From: Anders Ha Date: Mon, 23 Oct 2017 03:49:26 +0800 Subject: [PATCH] 0.1.1 (#15) --- ReactiveFeedback.podspec | 2 +- ReactiveFeedback/Info.plist | 2 +- script/update-version | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 script/update-version diff --git a/ReactiveFeedback.podspec b/ReactiveFeedback.podspec index 03bb2d8..1f78ee2 100644 --- a/ReactiveFeedback.podspec +++ b/ReactiveFeedback.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "ReactiveFeedback" - s.version = "0.1" + s.version = "0.1.1" s.summary = "Unidirectional reactive architecture" s.description = <<-DESC diff --git a/ReactiveFeedback/Info.plist b/ReactiveFeedback/Info.plist index b4e66f9..84545a2 100644 --- a/ReactiveFeedback/Info.plist +++ b/ReactiveFeedback/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.1 + 0.1.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/script/update-version b/script/update-version new file mode 100755 index 0000000..34dbb05 --- /dev/null +++ b/script/update-version @@ -0,0 +1,24 @@ +#!/bin/bash + +if [[ -z "$1" ]]; then + echo "Please specify a version tag." + exit +fi + +PRERELEASE_STRIPPED=$(echo "$1" | perl -0777 -ne '/([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?/ and print "$1.$2.$3"') + +if [[ -z "$PRERELEASE_STRIPPED" ]]; then + echo "The version tag is not semver compliant." + exit +fi + +CURRENT_TAG=$(perl -0777 -ne '/s.version([\s]+)=([\s]+)"(.+)"/ and print $3' *.podspec) +echo "Current tag: $CURRENT_TAG" + +perl -0777 -i -pe 's/s.version([\s]+)=([\s]+)"'${CURRENT_TAG}'"/s.version$1=$2"'${1}'"/' *.podspec +perl -0777 -i -pe 's/g>'${CURRENT_TAG}'<\/str/g>'${PRERELEASE_STRIPPED}'<\/str/' */Info.plist +perl -0777 -i -pe 's/g>'${CURRENT_TAG}'<\/str/g>'${PRERELEASE_STRIPPED}'<\/str/' */*/Info.plist +sed -i '' '3i\ +\ +# '${1} CHANGELOG.md +