-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: xcode-plugin
-
None
To reproduce:
- Select "Provide version number" option in Job Configuration
- Specify Technical version as some value
Expected:
- ${SHORT_VERSION} variable is being set
Actual:
- ${SHORT_VERSION} variable is empty
Cause:
Not setting parameters individually when "provideApplicationVersion" is true
XCodeBuilder.java, 575 - 605 @master
if (!provideApplicationVersion) { try { output.reset(); returnCode = launcher.launch().envs(envs).cmds("/usr/libexec/PlistBuddy", "-c", "Print :CFBundleVersion", app.absolutize().child("Info.plist").getRemote()).stdout(output).pwd(projectRoot).join(); if (returnCode == 0) { version = output.toString().trim(); } output.reset(); returnCode = launcher.launch().envs(envs).cmds("/usr/libexec/PlistBuddy", "-c", "Print :CFBundleShortVersionString", app.absolutize().child("Info.plist").getRemote()).stdout(output).pwd(projectRoot).join(); if (returnCode == 0) { shortVersion = output.toString().trim(); } } catch(Exception ex) { listener.getLogger().println("Failed to get version from Info.plist: " + ex.toString()); return false; } } else { if (! StringUtils.isEmpty(cfBundleVersionValue)) { version = cfBundleVersionValue; } else if (! StringUtils.isEmpty(cfBundleShortVersionStringValue)) { shortVersion = cfBundleShortVersionStringValue; } else { listener.getLogger().println("You have to provide a value for either the marketing or technical version. Found neither."); return false; } }