Skip to content

Initialize plist plugin with core functionality, README, and tests#2530

Open
czuria1 wants to merge 1 commit into
intuit:mainfrom
czuria1:plist-plugin
Open

Initialize plist plugin with core functionality, README, and tests#2530
czuria1 wants to merge 1 commit into
intuit:mainfrom
czuria1:plist-plugin

Conversation

@czuria1
Copy link
Copy Markdown

@czuria1 czuria1 commented May 21, 2026

Summary

This PR introduces a new @auto-it/plist plugin that manages versioning for Apple platform projects by reading and writing version strings directly inside .plist files.

Motivation

You could technically accomplish the same outcome with the existing version-file plugin — it already knows how to read and write arbitrary version strings out of arbitrary files. This plugin exists because Info.plist is the canonical version file for iOS, macOS, watchOS, and tvOS projects, and treating it as a first-class citizen deserves dedicated tooling.
The goals here are analogous to what the cocoapods plugin does for CocoaPods-based libraries: keep the on-disk version artifact in sync with the git tag so that platform tooling always sees the right version. The key difference is the target workflow:

  • CocoaPods generates an Info.plist for you as part of its build process, so teams using CocoaPods often rely on the cocoapods plugin to keep the .podspec version (and therefore the derived plist) in sync.
  • Swift Package Manager has no equivalent code-generation step — there is no .podspec, and SPM does not produce an Info.plist for you. Teams that want to expose a runtime version string from their library (e.g. for logging, telemetry, or SDK version headers) need to maintain that plist themselves. This plugin automates keeping it in sync with the git tag, giving SPM libraries the same versioning automation that CocoaPods projects get from the cocoapods plugin.

In short: if you ship a Swift package and want MySDK.version in your code to always reflect the current release without manual edits, this is the plugin for that.

What this plugin does

  • Reads the current version from a configurable plist key (default: CFBundleShortVersionString)
  • Calculates the next semver bump from PR labels
  • Writes the new version back into the plist, preserving all other XML content
  • Optionally syncs a second key (e.g. CFBundleVersion) with the same value
  • Supports multiple plist paths (e.g. an app target + an embedded framework)
  • Accepts an optional publishScript hook for custom distribution steps (xcframework upload, DocC hosting, etc.)
  • Canary and next (pre-release) version writes are ephemeral — they are reset and never committed

Relationship to other plugins

Plugin Version source Primary use case
version-file Any plain-text file Generic / language-agnostic
cocoapods .podspec iOS/macOS libraries distributed via CocoaPods
plist (this PR) Info.plist iOS/macOS apps & SPM libraries that manage their own plist

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major

@czuria1 czuria1 marked this pull request as ready for review May 21, 2026 03:15
@czuria1
Copy link
Copy Markdown
Author

czuria1 commented May 21, 2026

Hi @adierkens @hipstersmoothie @hborawski , I'm proposing the following plugin to help with versioning for SPM repositories that require knowing the versioning of the bundle through the Info.plist. Can I please get some help getting reviews from the right contributors for this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant