Skip to content

Conversation

graycreate
Copy link
Member

Summary

  • Fixed version detection in release workflow to work on Ubuntu runners
  • Changed from using macOS-specific plutil to using grep on project.pbxproj

Problem

The release workflow was failing because it tried to use plutil (a macOS utility) on Ubuntu runners.

Solution

Parse version and build number directly from V2er.xcodeproj/project.pbxproj using grep, which works on both macOS and Linux.

🤖 Generated with Claude Code

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 15:31
@graycreate graycreate merged commit f33c0d4 into main Sep 22, 2025
6 of 9 checks passed
@graycreate graycreate deleted the bugfix/release-workflow-version-detection branch September 22, 2025 15:32
Copy link

@Copilot 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 fixes the version detection in the release workflow to work on Ubuntu runners by replacing macOS-specific plutil commands with cross-platform grep parsing of the Xcode project file.

  • Replaced plutil XML parsing with grep parsing of project.pbxproj
  • Changed from parsing Info.plist to parsing V2er.xcodeproj/project.pbxproj
  • Updated comments to reflect the Linux compatibility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +42 to +43
CURRENT_VERSION=$(grep -m1 'MARKETING_VERSION = ' V2er.xcodeproj/project.pbxproj | sed 's/.*MARKETING_VERSION = \(.*\);/\1/' | xargs)
CURRENT_BUILD=$(grep -m1 'CURRENT_PROJECT_VERSION = ' V2er.xcodeproj/project.pbxproj | sed 's/.*CURRENT_PROJECT_VERSION = \(.*\);/\1/' | xargs)
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 grep patterns assume specific formatting of the project.pbxproj file. Consider adding error handling to check if the grep commands find matches, as Xcode project files can have varying formatting or the keys might not exist.

Suggested change
CURRENT_VERSION=$(grep -m1 'MARKETING_VERSION = ' V2er.xcodeproj/project.pbxproj | sed 's/.*MARKETING_VERSION = \(.*\);/\1/' | xargs)
CURRENT_BUILD=$(grep -m1 'CURRENT_PROJECT_VERSION = ' V2er.xcodeproj/project.pbxproj | sed 's/.*CURRENT_PROJECT_VERSION = \(.*\);/\1/' | xargs)
CURRENT_VERSION=$(grep -m1 'MARKETING_VERSION = ' V2er.xcodeproj/project.pbxproj | sed 's/.*MARKETING_VERSION = \(.*\);/\1/' | xargs)
if [ -z "$CURRENT_VERSION" ]; then
echo "❌ Error: MARKETING_VERSION not found in V2er.xcodeproj/project.pbxproj"
exit 1
fi
CURRENT_BUILD=$(grep -m1 'CURRENT_PROJECT_VERSION = ' V2er.xcodeproj/project.pbxproj | sed 's/.*CURRENT_PROJECT_VERSION = \(.*\);/\1/' | xargs)
if [ -z "$CURRENT_BUILD" ]; then
echo "❌ Error: CURRENT_PROJECT_VERSION not found in V2er.xcodeproj/project.pbxproj"
exit 1
fi

Copilot uses AI. Check for mistakes.

@github-actions
Copy link

Code Coverage Report ❌

Current coverage: 0%

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.

1 participant