diff --git a/.buildkite/create-backmerge.yml b/.buildkite/create-backmerge.yml new file mode 100644 index 0000000..64ce4d3 --- /dev/null +++ b/.buildkite/create-backmerge.yml @@ -0,0 +1,16 @@ +# Nodes with values to reuse in the pipeline. +common_params: + # Common plugin settings to use with the `plugins` key. + - &common_plugins + - automattic/a8c-ci-toolkit#3.5.1 + +steps: + - label: "Create Backmerge PR" + plugins: *common_plugins + command: | + .buildkite/commands/configure-git.sh + .buildkite/commands/checkout-release-branch.sh + + install_gems + + bundle exec fastlane create_backmerge_pr diff --git a/.ruby-version b/.ruby-version index a4dd9db..be94e6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.4 +3.2.2 diff --git a/Gemfile b/Gemfile index b8cc819..70cccc5 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,4 @@ gem 'nokogiri', '~> 1.14.3' # gem 'fastlane-plugin-wpmreleasetoolkit', '~> 7.0' # gem 'fastlane-plugin-wpmreleasetoolkit', path: '../../release-toolkit' -gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', branch: 'remove/git-push-actions' +gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', branch: 'trunk' diff --git a/Gemfile.lock b/Gemfile.lock index eaec8e5..5780a49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,57 +1,68 @@ GIT remote: https://github.com/wordpress-mobile/release-toolkit - revision: e26197f430a919e4d33bce7c69778870ca9e45af - branch: remove/git-push-actions + revision: 282ab6823c2185b1e83f435d144f79c64382a5a4 + branch: trunk specs: - fastlane-plugin-wpmreleasetoolkit (7.0.0) + fastlane-plugin-wpmreleasetoolkit (11.1.0) activesupport (>= 6.1.7.1) - bigdecimal (~> 1.4) buildkit (~> 1.5) chroma (= 0.2.0) diffy (~> 3.3) + fastlane (~> 2.213) git (~> 1.3) google-cloud-storage (~> 1.31) + java-properties (~> 0.3.0) nokogiri (~> 1.11) - octokit (~> 5.6) + octokit (~> 6.1) parallel (~> 1.14) plist (~> 3.1) progress_bar (~> 1.3) rake (>= 12.3, < 14.0) rake-compiler (~> 1.0) + xcodeproj (~> 1.22) GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.6) + CFPropertyList (3.0.7) + base64 + nkf rexml - activesupport (7.0.8) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (7.2.1) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - artifactory (3.0.15) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + artifactory (3.0.17) atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.828.0) - aws-sdk-core (3.183.1) - aws-eventstream (~> 1, >= 1.0.2) + aws-eventstream (1.3.0) + aws-partitions (1.970.0) + aws-sdk-core (3.202.2) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.71.0) - aws-sdk-core (~> 3, >= 3.177.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.135.0) - aws-sdk-core (~> 3, >= 3.181.0) + aws-sdk-kms (1.88.0) + aws-sdk-core (~> 3, >= 3.201.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.159.0) + aws-sdk-core (~> 3, >= 3.201.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.0) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.9.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) - bigdecimal (1.4.4) - buildkit (1.5.0) + base64 (0.2.0) + bigdecimal (3.1.8) + buildkit (1.6.0) sawyer (>= 0.6) chroma (0.2.0) claide (1.1.0) @@ -59,16 +70,17 @@ GEM colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.2.2) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) declarative (0.0.20) diffy (3.4.2) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20240107) dotenv (2.8.1) + drb (2.2.1) emoji_regex (3.2.3) - excon (0.103.0) + excon (0.111.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -90,22 +102,22 @@ GEM faraday-httpclient (1.0.1) faraday-multipart (1.0.4) multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.7) - fastlane (2.216.0) + fastimage (2.3.1) + fastlane (2.222.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -117,6 +129,7 @@ GEM gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) http-cookie (~> 1.0.5) @@ -125,10 +138,10 @@ GEM mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (~> 0.1.1) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (~> 3) @@ -137,14 +150,14 @@ GEM word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) gh_inspector (1.1.3) - git (1.18.0) + git (1.19.1) addressable (~> 2.8) rchardet (~> 1.8) - google-apis-androidpublisher_v3 (0.50.0) + google-apis-androidpublisher_v3 (0.54.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.1) + google-apis-core (0.11.3) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -152,24 +165,23 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.a) rexml - webrick google-apis-iamcredentials_v1 (0.17.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-playcustomapp_v1 (0.13.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.7.1) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.3.1) - google-cloud-storage (1.44.0) + google-cloud-errors (1.4.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) @@ -180,40 +192,42 @@ GEM os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.5) + http-cookie (1.0.7) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.14.1) + i18n (1.14.5) concurrent-ruby (~> 1.0) + java-properties (0.3.0) jmespath (1.6.2) - json (2.6.3) - jwt (2.7.1) - mini_magick (4.12.0) + json (2.7.2) + jwt (2.8.2) + base64 + logger (1.6.1) + mini_magick (4.13.2) mini_mime (1.1.5) - minitest (5.20.0) + minitest (5.25.1) multi_json (1.15.0) - multipart-post (2.3.0) + multipart-post (2.4.1) nanaimo (0.3.0) naturally (2.2.1) + nkf (0.2.0) nokogiri (1.14.5-arm64-darwin) racc (~> 1.4) - nokogiri (1.14.5-x86_64-linux) - racc (~> 1.4) - octokit (5.6.1) + octokit (6.1.1) faraday (>= 1, < 3) sawyer (~> 0.9) options (2.3.2) - optparse (0.1.1) + optparse (0.5.0) os (1.1.4) - parallel (1.23.0) - plist (3.7.0) - progress_bar (1.3.3) - highline (>= 1.6, < 3) + parallel (1.26.3) + plist (3.7.1) + progress_bar (1.3.4) + highline (>= 1.6) options (~> 2.3.0) - public_suffix (5.0.3) - racc (1.7.1) - rake (13.0.6) - rake-compiler (1.2.5) + public_suffix (6.0.1) + racc (1.8.1) + rake (13.2.1) + rake-compiler (1.2.7) rake rchardet (1.8.0) representable (3.2.0) @@ -221,15 +235,17 @@ GEM trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.6) + rexml (3.3.6) + strscan rouge (2.0.7) ruby2_keywords (0.0.5) rubyzip (2.3.2) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - security (0.1.3) - signet (0.18.0) + securerandom (0.3.1) + security (0.1.5) + signet (0.19.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) @@ -237,38 +253,34 @@ GEM simctl (1.6.10) CFPropertyList naturally + strscan (3.1.0) terminal-notifier (2.0.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (2.4.2) - webrick (1.8.1) + unicode-display_width (2.5.0) word_wrap (1.0.0) - xcodeproj (1.23.0) + xcodeproj (1.25.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) - rexml (~> 3.2.4) + rexml (>= 3.3.2, < 4.0) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) PLATFORMS - arm64-darwin-21 - x86_64-linux + arm64-darwin-23 DEPENDENCIES fastlane (~> 2) @@ -276,4 +288,4 @@ DEPENDENCIES nokogiri (~> 1.14.3) BUNDLED WITH - 2.3.19 + 2.4.22 diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 3cab6b3..aa01b27 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -2,6 +2,7 @@ 22.9 ----- +* [**] Another PR [https://github.com/wordpress-mobile/release-toolkit-demo/pull/48] 22.8 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0067b89..961edb4 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -5,6 +5,14 @@ FASTLANE_FOLDER = File.join(PROJECT_ROOT_FOLDER, 'fastlane') ORIGINAL_RELEASE_NOTES_PATH = File.join(PROJECT_ROOT_FOLDER, 'RELEASE-NOTES.txt') EXTRACTED_RELEASE_NOTES_PATH = File.join(PROJECT_ROOT_FOLDER, 'metadata', 'release_notes.txt') PLAY_STORE_STRINGS_PATH = File.join(PROJECT_ROOT_FOLDER, 'metadata', 'PlayStoreStrings.po') +VERSION_PROPERTIES_PATH = File.join(PROJECT_ROOT_FOLDER, 'version.properties') + +# Instantiate versioning classes +VERSION_CALCULATOR = Fastlane::Wpmreleasetoolkit::Versioning::MarketingVersionCalculator.new +VERSION_FORMATTER = Fastlane::Wpmreleasetoolkit::Versioning::RCNotationVersionFormatter.new +BUILD_CODE_FORMATTER = Fastlane::Wpmreleasetoolkit::Versioning::SimpleBuildCodeFormatter.new +BUILD_CODE_CALCULATOR = Fastlane::Wpmreleasetoolkit::Versioning::SimpleBuildCodeCalculator.new +VERSION_FILE = Fastlane::Wpmreleasetoolkit::Versioning::AndroidVersionFile.new(version_properties_path: VERSION_PROPERTIES_PATH) ######################################################################## # Environment @@ -86,6 +94,17 @@ platform :android do create_pr('trunk', "Merge #{app_version} final to trunk") end + lane :create_backmerge_pr do + version = release_version_current + + create_release_backmerge_pull_request( + repository: GHHELPER_REPO, + source_branch: "release/#{version}", + labels: ['Releases'], + milestone_title: release_version_next + ) + end + lane :update_appstore_strings do |options| ensure_git_status_clean @@ -188,5 +207,31 @@ platform :android do labels: 'Releases' ) end + + # Returns the current version name from `version.properties` without needing formatting or calculations + def version_name_current + VERSION_FILE.read_version_name + end + + # Returns the release version of the app in the format `1.2` or `1.2.3` if it is a hotfix + # + def release_version_current + # Read the current release version from `version.properties` and parse it into an AppVersion object + current_version = VERSION_FORMATTER.parse(VERSION_FILE.read_version_name) + # Return the formatted release version + VERSION_FORMATTER.release_version(current_version) + end + + # Returns the next release version of the app in the format `1.2` or `1.2.3` if it is a hotfix + # + def release_version_next + # Read the current release version from `version.properties` and parse it into an AppVersion object + current_version = VERSION_FORMATTER.parse(VERSION_FILE.read_version_name) + # Calculate the next release version + release_version_next = VERSION_CALCULATOR.next_release_version(version: current_version) + # Return the formatted release version + VERSION_FORMATTER.release_version(release_version_next) + end + end diff --git a/version.properties b/version.properties index f519ef5..1bf740d 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ #Mon, 30 Aug 2021 11:48:28 +0200 -versionName=22.8 -versionCode=1344 +versionName=22.9 +versionCode=1345