While the entry original topic was closed, I created a new one with a free changes for the current release 2021R2.1 and macOS 11.5.2.
I have I have tried to use the original script, but I got some errors. So I have made some changes, that is runs with the current releases.
Dim v(), longVersion, shortVersion, result, appName, appLocation, cmd As String
// Build version number strings
v.append PropertyValue(“App.MajorVersion”)
v.append “.”
v.append PropertyValue(“App.MinorVersion”)
v.append “.”
v.append PropertyValue(“App.BugVersion”)
shortVersion = Join(v,“”)
v.append “.”
v.append PropertyValue(“App.NonReleaseVersion”)
longVersion = Join(v,“”)appName = CurrentBuildAppName
appLocation = CurrentBuildLocation.ReplaceAll(“\”, “”) + “/” + appName.ReplaceAll(“\”, “”)// Set the long version number
cmd = “/usr/libexec/PlistBuddy -c ““Set :CFBundleVersion ”” '” + appLocation + “/Info.plist’”
cmd = cmd.Replace( “”, “'” + longVersion + “'” )
result = DoShellCommand(cmd)
if result <> “” then
print "Long version setting failed: " + cmd + " " + result
end if// Set the short version number
cmd = “/usr/libexec/PlistBuddy -c ““Set :CFBundleShortVersionString ”” '” + appLocation + “/Info.plist’”
cmd = cmd.Replace( “”, “'” + shortVersion + “'” )
result = DoShellCommand(cmd)
if result <> “” then
print "Short version setting failed: " + cmd + " " + result
end if