Swift Bump Version
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Set a Swift (SwiftPM library or command-line tool) or Apple app (XcodeGen/Tuist/xcconfig/.xcodeproj) project’s version to an exact
literal value across every file that needs to agree with it. A SwiftPM library carries no in-tree version field at
all — a consumer resolves it against the package’s git tag — so this skill only rewrites the files that mirror that
tag by this catalog’s own convention (version.txt, CHANGELOG.md, README dependency snippets). An Apple app, by
contrast, does carry an in-tree version (MARKETING_VERSION/CURRENT_PROJECT_VERSION), rewritten in whichever
project format is present. This skill never computes a version itself; it only applies exactly the string it is
given, after validating its shape.
Purpose
A Swift command-line tool (a Package.swift with an .executableTarget on ArgumentParser, such as the
iru-setup-swift-cli layout) keeps its version in source: Version.swift’s `toolVersion and/or a
CommandConfiguration(version:) literal, following the x.y.z-dev convention on the integration branch. The skill
rewrites those literals with an embedded, tested Python helper (--list/--dry-run) and checks that <bin> --version
prints the new value.
iru-swift-bump-version is the Swift/Apple-ecosystem equivalent of iru-java-bump-version/iru-typescript-bump-version/
iru-android-bump-version: a small, deterministic skill a caller (typically iru-release) can invoke with a
literal version string, without having to reason about SwiftPM’s git-tag-based versioning, XcodeGen/Tuist manifest
syntax, or agvtool. Because neither SwiftPM nor Xcode build settings parse or validate a free-form version string,
this skill validates with a regex and rewrites each file with a targeted python3 substitution (or, for a
hand-maintained .xcodeproj with no generator, via agvtool).
Plugin
Shipped by the iru-swift plugin of the ai-catalog marketplace (install with /plugin install iru-swift@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
Yes |
The exact target version string (e.g. |
None — the skill asks for it if omitted; an empty or whitespace-containing value is rejected up front. |
|
No |
Whether to also update |
Ask — the skill asks once, after confirming whether such mentions actually exist. |
|
No |
When |
|
|
No |
Overrides the auto-detected project kind ( |
Auto-detected from which manifest files exist at the repository root; asked via |
Outputs
-
Command-line tool: every
toolVersion/CommandConfiguration(version:)literal underSources/rewritten;CHANGELOG.mdleft to the caller. -
Library:
version.txtupdated (or created, only if the repository’ssync.yml/README actually reference it);CHANGELOG.md’s ` [Unreleased]heading renamed to[<new-version>] - <date>with a fresh## [Unreleased]reopened above it (skipped if the file doesn’t exist); README.package(url:, from:/exact:)snippets rewritten to the new version. -
App:
MARKETING_VERSIONset to the new version andCURRENT_PROJECT_VERSIONincremented by exactly 1, in whichever ofproject.yml(XcodeGen),Project.swift(Tuist), a*.xcconfigfile, or.xcodeproj(agvtool/project.pbxprojsed) actually carries the value. -
Optionally,
docs/antora.yml’s `version:field, Antora pages with a literal dependency snippet, and/or a README version badge mention, ifsync-fileswas accepted. -
A sanity check:
swift package dump-packagefor a library, aswift buildplus<bin> --versionread-back for a command-line tool, or an Xcode project regenerate
xcodebuild -showBuildSettingsround-trip (oragvtool what-version/what-marketing-versionread-back for a hand-maintained.xcodeproj) for an app. -
A report of the detected kind, the old and new version, every file actually changed (or skipped and why), and an explicit warning that — for a library — the git tag itself is the real release artifact, this skill never creates it.
-
No commit or git tag is created — this skill only edits files (or, on
dry-run: yes, only prints diffs).
Execution flow
Dependencies
Invokes
None — iru-swift-bump-version is a leaf skill; it only runs shell/python3/xcrun agvtool file rewrites and a
sanity check, it does not call any other skill in this catalog.
Invoked by
-
Release — Step 6, version bump for Swift/Apple projects.
Source
SKILL.md on GitHub — the file this page was generated from.