Fastlane:此项目似乎没有设置CURRENT_PROJECT_VERSION键

时间:2016-06-16 16:03:32

标签: ios ruby hockeyapp fastlane

我正在关注使用hockeyapp设置fastlane的website指南,但我遇到了错误

 # Build and publish the Beta version to Hockeyapp
lane :beta_hockeyapp do
# Build
build_app(
  # Not a production release, so add build number and do the color modulation of the icons
  release:false,
  # Modulate the colors of the icons by these degrees
  modulation:66.6,
  # Change the app name
  app_name:"<App Name>",
  # Set the app id
  app_identifier:"com.company.<appname>",
  # Set the path to the certificate to use in building
  certificate_path:"./Certificates/Company/<cert>.p12",
  # Set the password of the p12 certificate file
  certificate_password:"<password>",
  # Set the path to the provisioning profile to use (change this!)
  profile:"./Certificates/Company/<profile>.mobileprovision",
  # What configuration to use, usefull for keeping different API keys etc between environments
  configuration:"[INT] <project_name>",
  # Use this codesigning identity (this is the name of the certificate in your keychain)
  codesigning_identity:"Project Distribution",
  # Export an enterprise app
  export_method:"enterprise",
  # the projectname, this is the name of the .xcodeproj file and the folder containing your code in the project
  project_name:<Project>,
  # the scheme to build
  scheme:"Project-Internal",
  # the build number to use, we use the build number from Jenkins
  build_number: "1234" || ENV["BUILD_NUMBER"] 
)
# Push to Hockeyapp as Beta release
publish_hockey(release_type: "0")

我在actions文件夹中创建了build_number_icon.rb,我甚至尝试对build_number进行硬编码并测试运行fastlane。仍然得到同样的错误。我错过了什么吗?我一直在阅读指南,以防我错过了这些步骤。

{{1}}

2 个答案:

答案 0 :(得分:10)

修复了当您需要在项目的构建设置中设置数字时的错误&gt;当前项目版本。

答案 1 :(得分:9)

我使用fastlane,但不使用曲棍球。我个人没有遇到过这个问题。但是,警告会提醒您项目目标中的特定问题&gt;构建设置工具(在“版本控制”小节下列为“当前项目版本”)。在搜索字段中,输入CURRENT_PROJECT_VERSION,您会看到这是与build_number不同的值。我的项目没有设置,但我想曲棍球可能有不同的需求?

无论如何,似乎你忽略了要求的精确键值。