Jenkins打包iOS和安卓(Flutter)

1.首先去Jenkins官网下载Jenkins

2.然后启动jenkins

3.下载插件

4.新建项目

然后就是记录一下我的Shell,这个对于自己应该能看懂,并且知道什么意思,记录一下


cd ios

export LANG=en_US.UTF-8

flutter packages get

pod install

xcodebuild clean -workspace Runner.xcworkspace -scheme Runner -configuration Release

xcodebuild archive -workspace Runner.xcworkspace -scheme Runner -archivePath /Users/lilong/.jenkins/workspace/beijing/ios/beijing.xcarchive

xcodebuild -exportArchive -archivePath /Users/lilong/.jenkins/workspace/beijing/ios/beijing.xcarchive -exportPath /Users/lilong/.jenkins/workspace/beijing/ios/exportIpa -exportOptionsPlist /Users/lilong/.jenkins/workspace/beijing/ios/ExportOptions.plist

cd ..

flutter build apk


说明一下:

/Users/lilong/.jenkins/workspace这个就是jenkins的目录,新建的项目都在这里,打包也最好直接就在这里

ExportOptions.plist文件可以用xcode进行一次手动打包后生成,如果要上传蒲公英,看蒲公英官网的文档,我是直接用jenkins的蒲公英插件上传的。

你可能感兴趣的:(Jenkins打包iOS和安卓(Flutter))