Commit acb0976 crow
committed
1 parent 8ee960f commit acb0976 Copy full SHA for acb0976
File tree 1 file changed +9
-18
lines changed
1 file changed +9
-18
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash -ex
2
-
3
- REPO_PATH=` dirname " ${0} " ` /..
1
+ REPO_PATH=$( dirname " ${0} " ) /..
4
2
5
3
print_usage () {
6
- echo " usage: $0 -p <package_version>"
4
+ echo " usage: $0 <package_version>"
7
5
}
8
6
9
- while getopts p:i:a: FLAG
10
- do
11
- case " ${FLAG} " in
12
- p) VERSION=${OPTARG} ;;
13
- * ) print_usage
14
- exit 1 ;;
15
- esac
16
- done
17
-
18
- if [ -z $VERSION ]
19
- then
7
+ if [ $# -lt 1 ]; then
20
8
echo " $0 : A package version is required"
21
9
print_usage
22
10
exit 1
23
11
fi
24
12
13
+ VERSION=$1
14
+
15
+ echo " Updating package version to $VERSION in package.json..."
16
+ sed -i ' ' " s/\" version\" : \" .*\" ,/\" version\" : \" $VERSION \" ,/g" " $REPO_PATH /package.json"
25
17
26
- sed -i ' ' " s/\version \" : \" .* \" ,/\ version\" : \" $VERSION \" ,/g " " $REPO_PATH /package.json "
18
+ echo " Updating version to $VERSION in ios/AirshipReactNative.swift... "
27
19
sed -i ' ' " s/\(version:\ String *= *\)\" .*\" /\1\" $VERSION \" /g" " $REPO_PATH /ios/AirshipReactNative.swift"
28
20
29
- # Update iOS example dependencies
30
- # sed -i '' "s/\(pod *'AirshipExtensions\/NotificationService', *'~> *\).*'/\1$IOS_VERSION'/g" example/ios/Podfile
21
+ echo " Version update complete."
You can’t perform that action at this time.
0 commit comments