-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to update Xcode and Pod version
- Loading branch information
1 parent
d8b42a0
commit 61aff35
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
before: | ||
- script: | ||
content: ./scripts/update-version.sh "$VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "A single argument specifying the version must be provided" | ||
exit 1 | ||
fi | ||
|
||
VERSION=$1 | ||
NORMALISED_VERSION=${VERSION#"v"} | ||
|
||
echo "Setting version in Xcode project to $NORMALISED_VERSION" | ||
sed -E -i "" "s/(VERSION_NUMBER[[:blank:]]*=[[:blank:]]*).*;/\1$NORMALISED_VERSION;/" ./Partial.xcodeproj/project.pbxproj | ||
echo "Setting version in Podspec to $NORMALISED_VERSION" | ||
sed -E -i "" "s/(spec\\.version[[:blank:]]*=[[:blank:]]*)\".*\"/\1\"$NORMALISED_VERSION\"/" ./Partial.podspec |