Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change type from int to string #39

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion step/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func updateVersionNumbersInInfoPlist(helper *projectmanager.ProjectHelper, targe
absoluteInfoPlistPath := filepath.Join(filepath.Dir(helper.XcProj.Path), infoPlistPath)

infoPlist, format, _ := xcodeproj.ReadPlistFile(absoluteInfoPlistPath)
infoPlist["CFBundleVersion"] = bundleVersion
infoPlist["CFBundleVersion"] = strconv.Itoa(bundleVersion)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, my builds are currently failing on CI. by bundle version is 7.20.0 which I believe would fail strconv.Itoa. What was the need for this change? Cheers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./prog.go:11:27: cannot use "7.20.0" (untyped string constant) as int value in argument to strconv.Itoa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. What was the need for this update?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree that Apple considers CFBundleVersion to be in format X.Y.Z, in Bitrise docs there are multiple mentions that build numbers should be plain integers and not in format X.Y.Z.

Unless I'm mistaken, adopting this step in Bitrise implies to convert your CFBundleVersion to a plain integer.


if shortVersion != "" {
infoPlist["CFBundleShortVersionString"] = shortVersion
Expand Down