Android自动化打包配置截图如下:
export YARN_HOME=/usr/local/Cellar/yarn/1.5.1_1/bin
export PATH=$PATH:$YARN_HOME
export NODE_HOME=/Users/devops/.nvm/versions/node/v10.8.0
export PATH=$NODE_HOME/bin:$PATH
export POD_HOME=/Users/devops/.rvm/gems/ruby-2.4.0
export PATH=$POD_HOME/bin:$PATH
export ANDROID_HOME=/Users/devops/Library/Android/sdk
# export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;
echo $PATH
yarn install
#cnpm install
react-native bundle --entry-file index.js --platform android --dev false --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/
cd android && ./gradlew assembleRelease -x lint
#file=‘find . -name *.apk‘
#curl -F "[email protected]$file" -F "uKey=1367d748482b5c460ba7a750dd4b41ca" -F "_api_key=dc3c75b8c1d8e264a286414478b4d372" https://www.pgyer.com/apiv1/app/upload
#Debug
#curl -F "[email protected]/Users/devops/.jenkins/workspace/Starup_Android/app/build/outputs/apk/local/debug/localDebug-debug-local.apk" -F "uKey=1367d748482b5c460ba7a750dd4b41ca" -F "_api_key=dc3c75b8c1d8e264a286414478b4d372" https://www.pgyer.com/apiv1/app/upload
curl -F "[email protected]/Users/devops/.jenkins/workspace/poseidon_android/android/app/build/outputs/apk/release/app-release.apk" -F "uKey=1367d748482b5c460ba7a750dd4b41ca" -F "_api_key=dc3c75b8c1d8e264a286414478b4d372" https://www.pgyer.com/apiv1/app/upload
#Release
#curl -F "[email protected]/Users/devops/.jenkins/workspace/Starup_Android/app/build/outputs/apk/local/release/localRelease-release-local.apk" -F "uKey=1367d748482b5c460ba7a750dd4b41ca" -F "_api_key=dc3c75b8c1d8e264a286414478b4d372" https://www.pgyer.com/apiv1/app/upload
原文地址:https://www.cnblogs.com/lucy-lily/p/9993850.html