用來建置feature branch或是其他Branch使用
只打包 ipa, 不做Code Push
xcode-select --install
brew install yarn node
brew install watchman ruby flow yarn
sudo npm install -g react-native-cli
sudo gem install bundler
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'xcode-install', '2.2.0'" >> Gemfile
echo "gem 'cocoapods', '1.5.0'" >> Gemfile
echo "gem 'fastlane', '2.113.0'" >> Gemfile
false
-1
5
-1
-1
ylhealth
HRB_Mobile_Other_Branch
feature branch使用的版本,如:
feature/HA-818
其他Branch請自行設定
develop
commitId
4c1966d510b71fdf3ec67807321a385c5378cf86
feature/HA-1112
false
DownloadName
下載清單上要顯示的名稱
upgradeRN0598
false
API_SERVER
連線位置
10.32.86.124
false
HTT_PROTOCOL
http / https
http
false
2
https://cm.ylhealth.org/gitlab/ym/HRB_Mobile.git
3485e854-8389-40e8-8c86-b94e94e91904
*/${HRB_Mobile_Other_Branch}
false
Mac_Node1
false
false
false
false
false
PATH="$PATH:/usr/local/bin:/Users/jenkins/.fastlane/bin/"
VERSION=SIT_${DownloadName}_$(date +%Y%m%d)
MODIFIED_DATE=$(git log -1 --format="%ci" --)
# npm install --update-binary
rm -rf ios/Podfile.lock
rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i
cd ios/ && pod install && cd ../
sed -i '' "/url/s/http.*\//${HTT_PROTOCOL}:\/\/${API_SERVER}\//g" src/configs/index.js
sed -i '' "/version/s/\'.*\';/\'${VERSION}\';/" src/configs/index.js
sed -i '' "/modifiedTime/s/\'.*\';/\'${MODIFIED_DATE}\';/" src/configs/index.js
sed -i '' "/allergyUrl/s/\__DEV__.*\';/\'${HTT_PROTOCOL}:\/\/${API_SERVER}\/\';/" src/configs/index.js
sed -i '' 's/appVersion.*/appVersion": "1.27"/' appConfig.json
# RN0.57.8 modify(HA-1058), after RN0.58 will remove this command
sed -i "" 's/NSUInteger loopCount = 0;/CGFloat loopCount = 0;/' node_modules/react-native/Libraries/Image/RCTGIFImageDecoder.m
# security set-key-partition-list -S apple: -k Yonglinit123 -D "iPhone Distribution: YONGLIN YONGLIN BIOTECH CORP." -t private
##npm run bundle-worker-ios
npm run build-thread-ios
##echo "source 'https://rubygems.org'" > Gemfile
##echo "gem 'cocoapods', '1.4.0'" >> Gemfile
##echo "gem 'fastlane', '2.107.0'" >> Gemfile
#bundle update
#bundle install
bundle exec fastlane ios beta
VERSION=SIT_${DownloadName}_$(date +%Y%m%d)
MODIFIED_DATE=$(git log -1 --format="%ci" --)
NAME=HRB_Mobile
mv ~/jenkins/workspace/HRB_Mobile_Other_ipa/$NAME.ipa ~/Sites/${NAME}_${VERSION}.ipa
scp ~/Sites/${NAME}_${VERSION}.ipa appuploader@10.57.117.135:~/app/hrb/
false
false
xterm