From e0d210fb58684e83f80df0d955d0533adb0d608e Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 24 Feb 2026 14:22:04 +1100 Subject: [PATCH 1/6] Add `gem build` to reference commands --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index cc02f7a52..19c43e53d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,6 +22,7 @@ bundle exec rubocop # Run linter bundle exec rubocop -a # Auto-fix lint issues bundle exec yard doc # Generate docs, open in browser bundle exec yard stats --list-undoc # Show undocumented methods +gem build # Build the gem (no arguments — auto-picks the gemspec) rake new_release # Start a new release (interactive) ``` From 0bab4296be174b27140eea1666d1c35608f698cd Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 24 Feb 2026 14:22:32 +1100 Subject: [PATCH 2/6] Fix naming for Fastlane, Day One, and Pocket Casts --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 19c43e53d..30282154f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ This file provides guidance to AI agents when working with code in this reposito ## Overview -Release Toolkit is a fastlane plugin implemented as a Ruby gem (`fastlane-plugin-wpmreleasetoolkit`) providing actions and helper utilities for release automation of Automattic's mobile apps. It standardizes the release process across multiple products (WordPress, Jetpack, WooCommerce, DayOne, PocketCats, Tumblr, Studio, …), repositories, and platforms (iOS, Android, macOS). +Release Toolkit is a Fastlane plugin implemented as a Ruby gem (`fastlane-plugin-wpmreleasetoolkit`) providing actions and helper utilities for release automation of Automattic's mobile apps. It standardizes the release process across multiple products (WordPress, Jetpack, WooCommerce, Day One, Pocket Casts, Tumblr, Studio, …), repositories, and platforms (iOS, Android, macOS). - **Language**: Ruby (version in `.ruby-version`, minimum in `fastlane-plugin-wpmreleasetoolkit.gemspec`) - **Framework**: Fastlane plugin From 0e88e1040ce5cb7741da6837c74d6617693db17f Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 24 Feb 2026 14:25:08 +1100 Subject: [PATCH 3/6] Address `gem build` warning regarding `activesupport` declaration --- Gemfile.lock | 2 +- fastlane-plugin-wpmreleasetoolkit.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6dd251463..de257cb93 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: fastlane-plugin-wpmreleasetoolkit (14.0.0) - activesupport (>= 6.1.7.1) + activesupport (>= 6.1.7.1, < 8) buildkit (~> 1.5) chroma (= 0.2.0) diffy (~> 3.3) diff --git a/fastlane-plugin-wpmreleasetoolkit.gemspec b/fastlane-plugin-wpmreleasetoolkit.gemspec index 96251615f..3b68211e4 100644 --- a/fastlane-plugin-wpmreleasetoolkit.gemspec +++ b/fastlane-plugin-wpmreleasetoolkit.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| # since this would cause a circular dependency # spec.add_dependency 'your-dependency', '~> 1.0.0' - spec.add_dependency 'activesupport', '>= 6.1.7.1' # Required for fastlane to not crash when importing this plugin + spec.add_dependency 'activesupport', '>= 6.1.7.1', '< 8' # Required for fastlane to not crash when importing this plugin spec.add_dependency 'buildkit', '~> 1.5' spec.add_dependency 'chroma', '0.2.0' spec.add_dependency 'diffy', '~> 3.3' From 23afd9be1932d63ac7d423ffd300b723f4c671c7 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 24 Feb 2026 14:32:14 +1100 Subject: [PATCH 4/6] Add `patch?` method to `AppVersion` --- .../plugin/wpmreleasetoolkit/models/app_version.rb | 8 ++++++++ spec/app_version_spec.rb | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/models/app_version.rb b/lib/fastlane/plugin/wpmreleasetoolkit/models/app_version.rb index 5b65bb0e3..4b67a6553 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/models/app_version.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/models/app_version.rb @@ -24,6 +24,14 @@ def initialize(major, minor, patch = 0, build_number = 0) @build_number = build_number end + # Returns whether this version is a patch (hotfix) release. + # + # @return [Boolean] true if the patch component is greater than zero. + # + def patch? + @patch.positive? + end + # Converts the AppVersion object to a string representation. # This should only be used for internal debugging/testing purposes, not to write versions in version files # In order to format an `AppVersion` into a `String`, you should use the appropriate `VersionFormatter` for your project instead. diff --git a/spec/app_version_spec.rb b/spec/app_version_spec.rb index 43fbf7e1f..07225e92b 100644 --- a/spec/app_version_spec.rb +++ b/spec/app_version_spec.rb @@ -25,6 +25,18 @@ end end + describe '#patch?' do + it 'returns true when patch is greater than zero' do + app_version = described_class.new(1, 2, 3) + expect(app_version.patch?).to be true + end + + it 'returns false when patch is zero' do + app_version = described_class.new(1, 2, 0) + expect(app_version.patch?).to be false + end + end + describe '#to_s' do it 'returns the version as a formatted string' do app_version = described_class.new(2, 3, 4, 5) From ad3c2b1b6e81c05f7963f4ed76a40ef20f090a6a Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 24 Feb 2026 14:32:24 +1100 Subject: [PATCH 5/6] Add `valid?` method to `Configuration` --- .../wpmreleasetoolkit/models/configuration.rb | 5 ++++ spec/configuration_spec.rb | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb b/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb index dcb99d1d9..80d6f3b29 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb @@ -29,6 +29,11 @@ def add_file_to_copy(source, destination, encrypt: false) files_to_copy << file end + def valid? + !project_name.nil? && !project_name.empty? && + !branch.nil? && !branch.empty? + end + def to_hash { project_name: project_name, diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index 9b19ed464..8e04cdf2b 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -52,6 +52,35 @@ end end + describe '#valid?' do + it 'returns true when project_name and branch are present' do + config = described_class.new(project_name: 'MyProject', branch: 'trunk') + expect(config.valid?).to be true + end + + it 'returns false when project_name is empty' do + config = described_class.new(project_name: '', branch: 'trunk') + expect(config.valid?).to be false + end + + it 'returns false when project_name is nil' do + config = described_class.new(branch: 'trunk') + config.project_name = nil + expect(config.valid?).to be false + end + + it 'returns false when branch is empty' do + config = described_class.new(project_name: 'MyProject', branch: '') + expect(config.valid?).to be false + end + + it 'returns false when branch is nil' do + config = described_class.new(project_name: 'MyProject') + config.branch = nil + expect(config.valid?).to be false + end + end + describe '#add_file_to_copy' do it 'adds files to copy' do expect(subject.files_to_copy).to eq([]) From 10d2925d843fbe1eb9b584a7e050b688b8df71f8 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Wed, 25 Feb 2026 11:46:49 +1100 Subject: [PATCH 6/6] Use proper capitalization and formatting for _fastlane_ Co-authored-by: Olivier Halligon --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 30282154f..024ee6780 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ This file provides guidance to AI agents when working with code in this reposito ## Overview -Release Toolkit is a Fastlane plugin implemented as a Ruby gem (`fastlane-plugin-wpmreleasetoolkit`) providing actions and helper utilities for release automation of Automattic's mobile apps. It standardizes the release process across multiple products (WordPress, Jetpack, WooCommerce, Day One, Pocket Casts, Tumblr, Studio, …), repositories, and platforms (iOS, Android, macOS). +Release Toolkit is a _fastlane_ plugin implemented as a Ruby gem (`fastlane-plugin-wpmreleasetoolkit`) providing actions and helper utilities for release automation of Automattic's mobile apps. It standardizes the release process across multiple products (WordPress, Jetpack, WooCommerce, Day One, Pocket Casts, Tumblr, Studio, …), repositories, and platforms (iOS, Android, macOS). - **Language**: Ruby (version in `.ruby-version`, minimum in `fastlane-plugin-wpmreleasetoolkit.gemspec`) - **Framework**: Fastlane plugin