Skip to content

Conversation

@StephenHodgson
Copy link
Member

@StephenHodgson StephenHodgson commented Mar 28, 2025

  • add auto-increment-build-number input to auto increment CFBundleVersion
  • add platform-runtime-version input argument to specify a specific runtime sdk

- auto increment CFBundleVersion
@StephenHodgson StephenHodgson requested a review from Copilot March 28, 2025 12:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Xcode building and upload procedures by adding auto-increment functionality for CFBundleVersion while passing in additional parameters for Apple credentials and Xcode version. Key changes include:

  • Updating GetProjectDetails to accept an AppleCredential and a SemVer parameter.
  • Changing the Info.plist reading/writing to use asynchronous file operations with proper handle management.
  • Adjusting functions in AppStoreConnectClient and XcodeProject to export new methods and support the auto increment behavior.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

File Description
src/xcode.ts Modified GetProjectDetails to accept extra parameters and auto increment CFBundleVersion logic.
src/index.ts Updated instantiation of XcodeProject with new credential and xcodeVersion parameters.
src/XcodeProject.ts Added new properties (bundleVersion, credential, xcodeVersion) to the project model.
src/AppStoreConnectClient.ts Exported functions and adjusted logic to work with updated return types.
Files not reviewed (1)
  • package.json: Language not supported

@StephenHodgson StephenHodgson requested a review from Copilot March 28, 2025 12:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the Unity-Xcode builder by adding automatic CFBundleVersion incrementation and by refactoring Xcode project handling to include credentials and Xcode version information. Key changes include:

  • Updating GetProjectDetails to require AppleCredential and xcodeVersion and adjusting the parsing of Info.plist.
  • Refactoring file operations for reading/writing plist content as well as updating export options and bundle version logic.
  • Updating documentation and action metadata to align with new export options and auto-increment behavior.

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/xcode.ts Refactored GetProjectDetails and auto-increment build number logic with improved fs usage.
src/index.ts Updated GetProjectDetails call to include new parameters.
src/XcodeProject.ts Constructor updated to accept bundleVersion, credential, and xcodeVersion.
src/AppStoreConnectClient.ts Changed export structure for several functions and updated error type export.
action.yml Adjusted action name and input descriptions to match new export options.
README.md Updated documentation to reflect changes in export options and auto-increment feature.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

src/index.ts:41

  • There is a typo in the error message ('prase' should be corrected to 'parse').
throw new Error('Failed to prase Xcode version!');

src/AppStoreConnectClient.ts:126

  • The condition checks for a falsy lastBuildId and then attempts to find a build using a null id, which is likely unintended. Consider changing the condition to 'if (lastBuildId)' or adjusting the logic accordingly.
if (!lastBuildId) {

@StephenHodgson StephenHodgson requested a review from Copilot March 28, 2025 13:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the unity-xcode-builder action to version 1.2.0, with the primary aim of auto-incrementing the CFBundleVersion. Key changes include refactoring Xcode project detail gathering with additional parameters (AppleCredential and SemVer), updating App Store Connect client functions to export errors and IDs appropriately, and aligning documentation and workflows with the new features.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/xcode.ts Updated GetProjectDetails to accept new parameters and refactored plist handling.
src/index.ts Fixed a spelling error in error reporting and updated function usage accordingly.
src/XcodeProject.ts Extended the XcodeProject class to include bundleVersion, credential, and xcodeVersion.
src/AppStoreConnectClient.ts Exported functions and errors to update App Store Connect client handling.
action.yml Updated action inputs and adjusted descriptions to reflect new export options.
README.md Modified documentation to align with changes in export options and bundle version auto-increment.
.github/workflows/validate.yml Revised workflow steps to read version information from package.json.
Files not reviewed (1)
  • package.json: Language not supported

@StephenHodgson StephenHodgson marked this pull request as ready for review March 29, 2025 18:00
@StephenHodgson StephenHodgson requested a review from Copilot March 30, 2025 02:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements auto-incrementing of the CFBundleVersion for Xcode projects, along with adjustments to support new inputs (such as platform SDK version) and updates to exported API signatures. Key changes include:

  • Modifications to GetProjectDetails to accept credentials and Xcode version, and incorporating auto-increment logic for CFBundleVersion.
  • Updates to various helper functions and client methods to support the new project build flow.
  • Adjustments to action inputs and documentation to reflect the changes.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/xcode.ts Updates to project detail retrieval and auto-increment logic for CFBundleVersion, plus SDK version.
src/index.ts Updated credentials handling and error messages; passing new parameters to GetProjectDetails.
src/XcodeProject.ts Revised constructor to include bundleVersion, credential, and xcodeVersion.
src/AppStoreConnectClient.ts Exported functions and updated return types for app ID and bundle version retrieval.
action.yml Updated input definitions and defaults to match new export options and auto-increment feature.
README.md Documentation updates to reflect changes in supported inputs and behavior.
.github/workflows/validate.yml Workflow adjustments to source version information from package.json and enforce updated inputs.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

src/xcode.ts:75

  • Ensure that CFBundleVersion is properly converted to a number (e.g., using parseInt) in case the value is stored as a string in Info.plist, to prevent potential type issues during comparison.
const cFBundleVersion = infoPlist['CFBundleVersion'] as number;

@StephenHodgson StephenHodgson enabled auto-merge (squash) March 31, 2025 00:10
@StephenHodgson StephenHodgson disabled auto-merge March 31, 2025 02:11
@StephenHodgson StephenHodgson enabled auto-merge (squash) March 31, 2025 02:11
@StephenHodgson StephenHodgson disabled auto-merge March 31, 2025 02:11
@StephenHodgson StephenHodgson merged commit c0b82a2 into main Mar 31, 2025
1 check passed
@StephenHodgson StephenHodgson deleted the development branch March 31, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant