-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathMakefile
24 lines (20 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
####################################################################
#
# Rules used to build and release the SDK.
#
####################################################################
spm:
sh Tools/spm.sh
updateVersion:
sed -i '' -e "s/#define LEANPLUM_SDK_VERSION @.*/#define LEANPLUM_SDK_VERSION @\"`cat sdk-version.txt`\"/g" "./LeanplumSDK/LeanplumSDK/Classes/Internal/LPConstants.h";\
minVersion=6.0; version=`cat sdk-version.txt`;\
if [[ "$$version" != *"beta"* ]]; then \
sed -i '' -e "s/s.dependency 'Leanplum-iOS-SDK', .*/s.dependency 'Leanplum-iOS-SDK', \"~> $$minVersion\"/g" "./Leanplum-iOS-Location.podspec";\
sed -i '' -e "s/s.dependency 'Leanplum-iOS-SDK', .*/s.dependency 'Leanplum-iOS-SDK', \"~> $$minVersion\"/g" "./Leanplum-iOS-LocationAndBeacons.podspec";\
else \
sed -i '' -e "s/s.dependency 'Leanplum-iOS-SDK', .*/s.dependency 'Leanplum-iOS-SDK', \"~> $$minVersion-beta\"/g" "./Leanplum-iOS-Location.podspec";\
sed -i '' -e "s/s.dependency 'Leanplum-iOS-SDK', .*/s.dependency 'Leanplum-iOS-SDK', \"~> $$minVersion-beta\"/g" "./Leanplum-iOS-LocationAndBeacons.podspec";\
fi;
tagCommit:
git add LeanplumSDK/LeanplumSDK/Classes/Internal/LPConstants.h; git commit -am 'update version'; git tag `cat sdk-version.txt`; git push; git push origin `cat sdk-version.txt`
deploy: updateVersion tagCommit