diff --git a/ReactiveObjC.podspec b/ReactiveObjC.podspec index f917fd4db..c6e440265 100644 --- a/ReactiveObjC.podspec +++ b/ReactiveObjC.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "ReactiveObjC" - s.version = "3.0.0" + s.version = "3.1.0" s.summary = "The 2.x ReactiveCocoa Objective-C API: Streams of values over time" s.description = <<-DESC.strip_heredoc diff --git a/ReactiveObjC/Info.plist b/ReactiveObjC/Info.plist index 4cfbe42cc..9c6eca6cd 100644 --- a/ReactiveObjC/Info.plist +++ b/ReactiveObjC/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.0 + 3.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/ReactiveObjCTests/Info.plist b/ReactiveObjCTests/Info.plist index b75bb84e1..412820751 100644 --- a/ReactiveObjCTests/Info.plist +++ b/ReactiveObjCTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.0.0 + 3.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/script/update-version b/script/update-version new file mode 100755 index 000000000..34dbb0589 --- /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 +