Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemilla committed Nov 4, 2022
1 parent a0294bc commit 487d062
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Courier-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'Courier-iOS'
s.version = '1.0.20'
s.version = '1.0.21'
s.summary = 'Courier helps you build messaging infrastucture much faster!'

s.homepage = 'https://github.com/trycourier/courier-ios'
Expand Down
42 changes: 42 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
cat Sources/Courier/Courier.swift | while read LINE; do
if [[ $LINE == *"internal static let version"* ]]; then

# Get version from Courier file
VERSION=$(echo $LINE | sed -e 's/.*"\(.*\)".*/\1/')

cat Courier-iOS.podspec | while read SPEC_VERSION; do
if [[ $SPEC_VERSION == *"s.version ="* ]]; then

# Replace PODSPEC version
NEW_SPEC_VERSION="s.version = '$VERSION'"
if [[ $SPEC_VERSION != "" && $NEW_SPEC_VERSION != "" ]]; then
sed -i '.bak' "s/$SPEC_VERSION/$NEW_SPEC_VERSION/g" "Courier-iOS.podspec"
fi

fi
done

# Delete backup file
rm "Courier-iOS.podspec.bak"

# Bump the version
git add .
git commit -m "Bump"
git push

# Create a new tag with the version and push
git tag $VERSION
git push --tags

# Ensure github is installed
brew install gh
gh auth login

# gh release create
gh release create $VERSION --generate-notes

# Push to pods
pod trunk push

fi
done

0 comments on commit 487d062

Please sign in to comment.