-
Couldn't load subscription status.
- Fork 48
refactor: centralize version configuration #37
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
Conversation
- VERSION_NAME (MARKETING_VERSION): 1.1.2 - VERSION_CODE (CURRENT_PROJECT_VERSION): 29 - Added VERSIONING.md documentation for clarity
- Moved MARKETING_VERSION and CURRENT_PROJECT_VERSION to project-level configs - Target configurations now inherit from project level (no more duplication) - Added Version.xcconfig file for documentation - Updated VERSIONING.md with clear instructions - Now only need to update 2 places instead of 4 when changing versions This makes version management less error-prone and easier to maintain.
Code Coverage Report ❌Current coverage: 0% |
There was a problem hiding this 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 centralizes version configuration by moving version definitions from target-level to project-level configurations, reducing the number of places where versions need to be updated from 4 to 2.
- Moved MARKETING_VERSION and CURRENT_PROJECT_VERSION to project-level Debug and Release configurations
- Removed duplicate version definitions from target configurations (they now inherit from project level)
- Added comprehensive documentation explaining the version management system
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| VERSIONING.md | Added comprehensive documentation for version management process and terminology |
| V2er/Config/Version.xcconfig | Created configuration file with centralized version definitions |
| V2er.xcodeproj/project.pbxproj | Moved version settings from target to project level configurations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // Version.xcconfig | ||
| // Centralized version configuration for V2er iOS app | ||
| // | ||
| // To update versions, only modify these two lines: | ||
| // VERSION_NAME: User-facing version (e.g., 1.1.2) | ||
| // VERSION_CODE: Build number (must always increase) | ||
|
|
||
| // VERSION_NAME - This is what users see (e.g., 1.1.2) | ||
| MARKETING_VERSION = 1.1.2 | ||
|
|
||
| // VERSION_CODE - Internal build number (e.g., 29, 30, 31...) | ||
| CURRENT_PROJECT_VERSION = 29 No newline at end of file |
Copilot
AI
Sep 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Version.xcconfig file defines version values but isn't being used in the project configuration. The project.pbxproj file contains hardcoded version values instead of referencing this configuration file. Either remove this file or update the project to actually use it by including it in the build configurations.
| // Version.xcconfig | |
| // Centralized version configuration for V2er iOS app | |
| // | |
| // To update versions, only modify these two lines: | |
| // VERSION_NAME: User-facing version (e.g., 1.1.2) | |
| // VERSION_CODE: Build number (must always increase) | |
| // VERSION_NAME - This is what users see (e.g., 1.1.2) | |
| MARKETING_VERSION = 1.1.2 | |
| // VERSION_CODE - Internal build number (e.g., 29, 30, 31...) | |
| CURRENT_PROJECT_VERSION = 29 |
| To update versions, you only need to modify **2 locations** in `V2er.xcodeproj/project.pbxproj`: | ||
|
|
||
| 1. Search for the **Debug** project configuration and update: | ||
| ``` | ||
| /* Debug project configuration */ | ||
| MARKETING_VERSION = 1.1.2; /* VERSION_NAME */ | ||
| CURRENT_PROJECT_VERSION = 29; /* VERSION_CODE */ | ||
| ``` | ||
|
|
||
| 2. Search for the **Release** project configuration and update: | ||
| ``` | ||
| /* Release project configuration */ | ||
| MARKETING_VERSION = 1.1.2; /* VERSION_NAME */ | ||
| CURRENT_PROJECT_VERSION = 29; /* VERSION_CODE */ | ||
| ``` | ||
|
|
||
| That's it! The target configurations will automatically inherit these values. |
Copilot
AI
Sep 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states versions need to be updated in 2 locations, but with the Version.xcconfig file present, this creates confusion about the actual source of truth. The documentation should either reference the xcconfig file as the single source or clarify why both approaches exist.
| To update versions, you only need to modify **2 locations** in `V2er.xcodeproj/project.pbxproj`: | |
| 1. Search for the **Debug** project configuration and update: | |
| ``` | |
| /* Debug project configuration */ | |
| MARKETING_VERSION = 1.1.2; /* VERSION_NAME */ | |
| CURRENT_PROJECT_VERSION = 29; /* VERSION_CODE */ | |
| ``` | |
| 2. Search for the **Release** project configuration and update: | |
| ``` | |
| /* Release project configuration */ | |
| MARKETING_VERSION = 1.1.2; /* VERSION_NAME */ | |
| CURRENT_PROJECT_VERSION = 29; /* VERSION_CODE */ | |
| ``` | |
| That's it! The target configurations will automatically inherit these values. | |
| To update versions, simply edit the values in the `Version.xcconfig` file at the root of the project: | |
MARKETING_VERSION = 1.1.2 // VERSION_NAME
CURRENT_PROJECT_VERSION = 29 // VERSION_CODE
All targets (Debug and Release) will automatically inherit these values from the xcconfig file. You do **not** need to update any values in `project.pbxproj`.
> **Note:** If you previously updated version numbers in `project.pbxproj`, you can now manage them exclusively in `Version.xcconfig` for consistency and simplicity.
Summary
Problem
Previously had to update versions in 4 places:
This was error-prone and could lead to inconsistencies.
Solution
Changes
Result
Now only need to update 2 places when changing versions:
This makes version management simpler and less error-prone.
🤖 Generated with Claude Code