Skip to content

Commit 5f3d002

Browse files
graycreateclaude
andauthored
refactor: Move Version.xcconfig to project root (#72)
Moved Version.xcconfig from V2er/Config/ subdirectory to project root for better visibility and easier access. Changes: 1. Moved V2er/Config/Version.xcconfig → Version.xcconfig - Updated Xcode project reference (sourceTree: SOURCE_ROOT) 2. Updated all automation references: - .github/workflows/release.yml - fastlane/Fastfile - fastlane/changelog_helper.rb Benefits: - Version file is now at top level, easier to find - Clearer separation from app-specific code - Consistent with common iOS project conventions - Matches improvements made to ULPB-iOS and DaysTill projects Note: This project already had proper version management (no hardcoded versions in project.pbxproj), so this is purely a structural improvement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent f283b7e commit 5f3d002

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'V2er/Config/Version.xcconfig'
8+
- 'Version.xcconfig'
99
workflow_dispatch:
1010
inputs:
1111
force_release:
@@ -38,8 +38,8 @@ jobs:
3838
id: check
3939
run: |
4040
# Get current version from Version.xcconfig (works on Linux)
41-
CURRENT_VERSION=$(grep '^MARKETING_VERSION = ' V2er/Config/Version.xcconfig | sed 's/.*MARKETING_VERSION = //' | xargs)
42-
CURRENT_BUILD=$(grep '^CURRENT_PROJECT_VERSION = ' V2er/Config/Version.xcconfig | sed 's/.*CURRENT_PROJECT_VERSION = //' | xargs)
41+
CURRENT_VERSION=$(grep '^MARKETING_VERSION = ' Version.xcconfig | sed 's/.*MARKETING_VERSION = //' | xargs)
42+
CURRENT_BUILD=$(grep '^CURRENT_PROJECT_VERSION = ' Version.xcconfig | sed 's/.*CURRENT_PROJECT_VERSION = //' | xargs)
4343
4444
echo "Current version: $CURRENT_VERSION (build $CURRENT_BUILD)"
4545

V2er.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
5D91F8D426F22A6F0089D72E /* TagDetailState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagDetailState.swift; sourceTree = "<group>"; };
286286
5D91F8D826F22CEC0089D72E /* TagDetailReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagDetailReducer.swift; sourceTree = "<group>"; };
287287
5D9D5222269543DA00D80D6B /* TagDetailPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagDetailPage.swift; sourceTree = "<group>"; };
288-
5DA0000000000000000001 /* Version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
288+
5DA0000000000000000001 /* Version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = SOURCE_ROOT; };
289289
5DA2AD3426C17EA5007FB1EF /* Store.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Store.swift; sourceTree = "<group>"; };
290290
5DA2AD3626C17EB9007FB1EF /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
291291
5DA2AD3826C17ECC007FB1EF /* Action.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Action.swift; sourceTree = "<group>"; };
File renamed without changes.

fastlane/Fastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ platform :ios do
121121

122122
# Get the latest TestFlight build number and increment
123123
# Read current build number from xcconfig
124-
xcconfig_path = "../V2er/Config/Version.xcconfig"
124+
xcconfig_path = "../Version.xcconfig"
125125
xcconfig_content = File.read(xcconfig_path)
126126
current_build_number = xcconfig_content.match(/CURRENT_PROJECT_VERSION = (\d+)/)[1].to_i
127127
current_version = xcconfig_content.match(/MARKETING_VERSION = (.+)/)[1].strip

fastlane/changelog_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def self.format_for_testflight(content)
109109
# Get the current version from Version.xcconfig
110110
# @return [String] The current marketing version
111111
def self.get_current_version
112-
xcconfig_path = File.expand_path("../V2er/Config/Version.xcconfig", __dir__)
112+
xcconfig_path = File.expand_path("../Version.xcconfig", __dir__)
113113

114114
unless File.exist?(xcconfig_path)
115115
UI.user_error!("Version.xcconfig not found at #{xcconfig_path}")

0 commit comments

Comments
 (0)