native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #151 from onevcat/feature/cli-unified-version

feat(cli): unify CLI version with app MARKETING_VERSION

authored by

Wei Wang and committed by
GitHub
292f0247 e02ccd41

+19 -10
+12 -3
Makefile
··· 85 85 build-app: ensure-ghostty embed-cli # Build the macOS app (Debug) 86 86 bash -o pipefail -c 'xcodebuild -project supacode.xcodeproj -scheme supacode -configuration Debug build -skipMacroValidation -clonedSourcePackagesDirPath $(SPM_CACHE_DIR) 2>&1 | mise exec -- xcsift -qw --format toon' 87 87 88 - build-cli: # Build Swift CLI binary (SPM) 88 + sync-cli-version: # Sync app MARKETING_VERSION into ProwlCLIShared/ProwlVersion.swift 89 + @version="$$(/usr/bin/awk -F' = ' '/MARKETING_VERSION = [0-9.]*;/{gsub(/;/,"",$$2);print $$2; exit}' \ 90 + "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj")"; \ 91 + dst="$(CURRENT_MAKEFILE_DIR)/supacode/CLIService/Shared/ProwlVersion.swift"; \ 92 + printf '// Auto-generated by Makefile (sync-cli-version). Do not edit.\n\npublic enum ProwlVersion {\n public static let current = "%s"\n}\n' "$$version" > "$$dst" 93 + 94 + build-cli: sync-cli-version # Build Swift CLI binary (SPM) 89 95 swift build --product prowl 90 96 91 - build-cli-release: # Build CLI binary in release mode 97 + build-cli-release: sync-cli-version # Build CLI binary in release mode 92 98 swift build -c release --product prowl 93 99 94 100 embed-cli: build-cli-release # Build CLI and copy into Resources for app bundling ··· 326 332 "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj"; \ 327 333 sed -i '' "s/CURRENT_PROJECT_VERSION = [0-9]*;/CURRENT_PROJECT_VERSION = $$build;/g" \ 328 334 "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj"; \ 329 - git add "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj"; \ 335 + printf '// Auto-generated by Makefile (sync-cli-version). Do not edit.\n\npublic enum ProwlVersion {\n public static let current = "%s"\n}\n' "$$version" > \ 336 + "$(CURRENT_MAKEFILE_DIR)/supacode/CLIService/Shared/ProwlVersion.swift"; \ 337 + git add "$(CURRENT_MAKEFILE_DIR)/supacode.xcodeproj/project.pbxproj" \ 338 + "$(CURRENT_MAKEFILE_DIR)/supacode/CLIService/Shared/ProwlVersion.swift"; \ 330 339 git commit -m "bump v$$version"; \ 331 340 git tag -s "v$$version" -m "v$$version"; \ 332 341 echo "version bumped to $$version (build $$build), tagged v$$version"
+1 -6
ProwlCLI/Commands/ProwlCommand.swift
··· 3 3 4 4 import ArgumentParser 5 5 import Foundation 6 + import ProwlCLIShared 6 7 7 8 struct ProwlCommand: ParsableCommand { 8 9 static let configuration = CommandConfiguration( ··· 20 21 defaultSubcommand: OpenCommand.self 21 22 ) 22 23 } 23 - 24 - // MARK: - Version 25 - 26 - enum ProwlVersion { 27 - static let current = "1.0.0-dev" 28 - }
+1 -1
ProwlCLITests/ProwlCLIIntegrationTests.swift
··· 17 17 func testHelpAndVersionSmoke() throws { 18 18 let version = try runProwl(args: ["--version"]) 19 19 XCTAssertEqual(version.exitCode, 0) 20 - XCTAssertTrue(version.stdout.contains("1.0.0-dev")) 20 + XCTAssertTrue(version.stdout.contains(ProwlVersion.current)) 21 21 22 22 let help = try runProwl(args: ["--help"]) 23 23 XCTAssertEqual(help.exitCode, 0)
+5
supacode/CLIService/Shared/ProwlVersion.swift
··· 1 + // Auto-generated by Makefile (sync-cli-version). Do not edit. 2 + 3 + public enum ProwlVersion { 4 + public static let current = "2026.4.2" 5 + }