用來建置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-1040_
false
DownloadName
下載清單上要顯示的名稱
test57
false
API_SERVER
連線位置
10.32.86.124
false
2
https://cm.ylhealth.org/gitlab/ym/HRB_Mobile.git
3485e854-8389-40e8-8c86-b94e94e91904
*/${HRB_Mobile_Other_Branch}
false
MAC_BUILD_Machine
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
yarn install
sed -i "" '/url/s/http.*\//https:\/\/hrb.foxconn.com\//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 '' 's/piwikSiteId_ios =.*/piwikSiteId_ios = 10;/ ;s/piwikSiteId_android =.*/piwikSiteId_android = 11;/' src/configs/index.js
# 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 release
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