繁体   English   中英

如何为iOS CICD设置使用fastlane和jenkins增加内部版本号?

[英]How to increment build number using fastlane and jenkins for iOS CICD setup?

我在iOS CICD设置中使用fastlane和jenkins。 我在fastfile中使用了一个命令increment_build_number ,以便为每个内部部署向crashlytics递增内部版本号。

最初,它是在info.plist中增加Bundle版本 ,而不是Bundle版本string,short 在中间,我在Xcode中将Bundle版本字符串,简称为1.0.0更改为测试是否在下次部署期间将Bundle版本字符串,简称为1.0.1更改。

递增后的增量编号完全无效,并且不会增量捆绑版本捆绑版本字符串short

我在这里找不到问题。 我们是否不应该手动更改Xcode中的任何捆绑软件版本,以及如何再次解决此问题?

检查Xcode中的版本控制设置-Xcode->目标->构建设置->搜索版本控制

  • 将Versioning System更改为Apple Generic
  • 将“当前项目版本”设置为要启动的版本值,例如,“当前项目版本” = 1

在此处输入图片说明

在Fastlane脚本中,您可以根据需要从下面选择:

 increment_version_number # Automatically increment patch version number

 increment_version_number(
 bump_type: "patch" # Automatically increment patch version number
 )

 increment_version_number(
 bump_type: "minor" # Automatically increment minor version number
 )

 increment_version_number(
 bump_type: "major" # Automatically increment major version number
 )

 increment_version_number(
 version_number: "2.1.1" # Set a specific version number
 )

 increment_version_number(
 version_number: "2.1.1",      # specify specific version number (optional, 
 omitting it increments patch version number)
 xcodeproj: "./path/to/MyApp.xcodeproj"  # (optional, you must specify the 
 path to your main Xcode project if it is not in the project root directory)
 )

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM