Skip to content

Conversation

@graycreate
Copy link
Member

Summary

  • Centralized version configuration to reduce duplication from 4 places to 2
  • Versions now defined at project level and inherited by targets

Problem

Previously had to update versions in 4 places:

  • Debug target configuration: MARKETING_VERSION and CURRENT_PROJECT_VERSION
  • Release target configuration: MARKETING_VERSION and CURRENT_PROJECT_VERSION

This was error-prone and could lead to inconsistencies.

Solution

  1. Moved version definitions to project-level configurations (Debug and Release)
  2. Removed version definitions from target-level configurations
  3. Target configurations now inherit from project level automatically

Changes

  • ✅ Project Debug config: Added MARKETING_VERSION = 1.1.2 and CURRENT_PROJECT_VERSION = 29
  • ✅ Project Release config: Added MARKETING_VERSION = 1.1.2 and CURRENT_PROJECT_VERSION = 29
  • ✅ Target configs: Removed duplicate version definitions (they now inherit)
  • ✅ Added Version.xcconfig for documentation
  • ✅ Updated VERSIONING.md with clear instructions

Result

Now only need to update 2 places when changing versions:

  1. Project Debug configuration
  2. Project Release configuration

This makes version management simpler and less error-prone.

🤖 Generated with Claude Code

- 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.
Copilot AI review requested due to automatic review settings September 22, 2025 15:54
@graycreate graycreate merged commit fe9a9d3 into main Sep 22, 2025
6 checks passed
@graycreate graycreate deleted the feature/centralize-version-config branch September 22, 2025 15:55
@github-actions
Copy link

Code Coverage Report ❌

Current coverage: 0%

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 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.

Comment on lines +1 to +12
// 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
Copy link

Copilot AI Sep 22, 2025

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.

Suggested change
// 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

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +43
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.
Copy link

Copilot AI Sep 22, 2025

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants