fastlane-plugin-wpmreleasetoolkit 7.1.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a0d3e4cb24d24a7790f4e2268b2979b289b93b925ed83d8c34d5ed898845412
4
- data.tar.gz: 69e8fa3737c7d4429cf19928e07af0a4a01e48a39ad2f70434ab678cf20843f8
3
+ metadata.gz: 49fe82a4a0c5f54672972ea1c72fe076c22a6d641165d5e227564259e59b7e5f
4
+ data.tar.gz: e2592c11c44501af75a4ec4c1296afc4d23595f0a622ea24acb080d59646da34
5
5
  SHA512:
6
- metadata.gz: 483ae0c7e47e5421af88c1e289d450e7949b5345753ab4f42ef36f65bad37c030b3e7f4846456105c311ce19ce7c0f06aa5a634b76a248eb3c14fcd0b93ba610
7
- data.tar.gz: dbd1102a901d283e99ea5d0ea8f552a430e60880fd2d5562992a4b1819750feaa9a07914e6653ccfbfea56c7e14781eddd806c4c81607c5d8cabdca2fe47cf4c
6
+ metadata.gz: 05da20110bf1f968c726ddbf7cd62f922d7c215109c675f4706190816150d8f307c4aaf9707d00c9f91639e87e82bc57a50be997fc19602a9f9358c0d67f4c1e
7
+ data.tar.gz: 69e61be4a7304fcdf18402a97c28311cc165542693bb78fc9a50681903b207d77492c04adda2cac991572f92e26de581b560964ff8b7c448630736b1db91760d
@@ -26,7 +26,7 @@ module Fastlane
26
26
  Action.sh('./gradlew', params[:lint_task])
27
27
  end
28
28
 
29
- Fastlane::Helper::GitHelper.commit(message: 'Update translations', files: res_dir, push: true) unless params[:skip_commit]
29
+ Fastlane::Helper::GitHelper.commit(message: 'Update translations', files: res_dir) unless params[:skip_commit]
30
30
  end
31
31
 
32
32
  #####################################################
@@ -38,7 +38,7 @@ module Fastlane
38
38
  end
39
39
 
40
40
  def self.details
41
- 'Download translations from GlotPress, update local strings.xml files accordingly, lint, commit the changes, and push to the remote'
41
+ 'Download translations from GlotPress, update local strings.xml files accordingly, lint, commit the changes'
42
42
  end
43
43
 
44
44
  def self.available_options
@@ -90,7 +90,7 @@ module Fastlane
90
90
  FastlaneCore::ConfigItem.new(
91
91
  key: :skip_commit,
92
92
  env_name: 'FL_DOWNLOAD_TRANSLATIONS_SKIP_COMMIT',
93
- description: 'If set to true, will skip the commit/push step. Otherwise, it will commit the changes and push them (the default)',
93
+ description: 'If set to true, will skip the commit step',
94
94
  type: Boolean,
95
95
  default_value: false
96
96
  ),
@@ -12,7 +12,7 @@ module Fastlane
12
12
  next_version = Fastlane::Helper::Android::VersionHelper.calc_next_release_short_version(params[:new_version])
13
13
 
14
14
  Fastlane::Helper::ReleaseNotesHelper.add_new_section(path: path, section_title: next_version)
15
- Fastlane::Helper::GitHelper.commit(message: "Release Notes: add new section for next version (#{next_version})", files: path, push: true)
15
+ Fastlane::Helper::GitHelper.commit(message: "Release Notes: add new section for next version (#{next_version})", files: path)
16
16
 
17
17
  UI.message 'Done.'
18
18
  end
@@ -59,7 +59,7 @@ module Fastlane
59
59
  FastlaneCore::ConfigItem.new(key: :locales,
60
60
  env_name: 'FL_DOWNLOAD_METADATA_LOCALES',
61
61
  description: 'The hash with the GlotPress locale and the project locale association',
62
- is_string: false),
62
+ type: Hash),
63
63
  FastlaneCore::ConfigItem.new(key: :source_locale,
64
64
  env_name: 'FL_DOWNLOAD_METADATA_SOURCE_LOCALE',
65
65
  description: 'The source locale code',
@@ -18,7 +18,6 @@ module Fastlane
18
18
  repo_clean = repo_status.empty?
19
19
  unless repo_clean
20
20
  Action.sh('git commit -m "Update metadata strings"')
21
- Action.sh('git push')
22
21
  end
23
22
  end
24
23
 
@@ -12,7 +12,7 @@ module Fastlane
12
12
  next_version = Fastlane::Helper::Ios::VersionHelper.calc_next_release_version(params[:new_version])
13
13
 
14
14
  Fastlane::Helper::ReleaseNotesHelper.add_new_section(path: path, section_title: next_version)
15
- Fastlane::Helper::GitHelper.commit(message: "Release Notes: add new section for next version (#{next_version})", files: path, push: true)
15
+ Fastlane::Helper::GitHelper.commit(message: "Release Notes: add new section for next version (#{next_version})", files: path)
16
16
 
17
17
  UI.message 'Done.'
18
18
  end
@@ -4,9 +4,10 @@ module Fastlane
4
4
  # Helper methods to execute git-related operations that are specific to Android projects
5
5
  #
6
6
  module GitHelper
7
- # Commit and push the files that are modified when we bump version numbers on an iOS project
7
+ # Commit the files that are modified when we bump version numbers on an Android project
8
8
  #
9
- # This typically commits and pushes the `build.gradle` file inside the project subfolder.
9
+ # This typically commits the `version.properties` inside root folder or `build.gradle` file
10
+ # inside the project subfolder.
10
11
  #
11
12
  # @env PROJECT_ROOT_FOLDER The path to the git root of the project
12
13
  # @env PROJECT_NAME The name of the directory containing the project code (especially containing the `build.gradle` file)
@@ -16,14 +17,12 @@ module Fastlane
16
17
  if File.exist?(Fastlane::Helper::Android::VersionHelper.version_properties_file)
17
18
  Fastlane::Helper::GitHelper.commit(
18
19
  message: 'Bump version number',
19
- files: File.join(ENV['PROJECT_ROOT_FOLDER'], 'version.properties'),
20
- push: true
20
+ files: File.join(ENV['PROJECT_ROOT_FOLDER'], 'version.properties')
21
21
  )
22
22
  else
23
23
  Fastlane::Helper::GitHelper.commit(
24
24
  message: 'Bump version number',
25
- files: File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'build.gradle'),
26
- push: true
25
+ files: File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'build.gradle')
27
26
  )
28
27
  end
29
28
  end
@@ -73,16 +73,15 @@ module Fastlane
73
73
  Action.sh('git', 'submodule', 'update', '--init', '--recursive')
74
74
  end
75
75
 
76
- # Create a new branch named `branch_name`, cutting it from branch/commit/tag `from`, and push it
76
+ # Create a new branch named `branch_name`, cutting it from branch/commit/tag `from`
77
77
  #
78
78
  # If the branch with that name already exists, it will instead switch to it and pull new commits.
79
79
  #
80
80
  # @param [String] branch_name The full name of the new branch to create, e.g "release/1.2"
81
81
  # @param [String?] from The branch or tag from which to cut the branch from.
82
82
  # If `nil`, will cut the new branch from the current commit. Otherwise, will checkout that commit/branch/tag before cutting the branch.
83
- # @param [Bool] push If true, will also push the branch to `origin`, tracking the upstream branch with the local one.
84
83
  #
85
- def self.create_branch(branch_name, from: nil, push: true)
84
+ def self.create_branch(branch_name, from: nil)
86
85
  if branch_exists?(branch_name)
87
86
  UI.message("Branch #{branch_name} already exists. Skipping creation.")
88
87
  Action.sh('git', 'checkout', branch_name)
@@ -90,22 +89,19 @@ module Fastlane
90
89
  else
91
90
  Action.sh('git', 'checkout', from) unless from.nil?
92
91
  Action.sh('git', 'checkout', '-b', branch_name)
93
- Action.sh('git', 'push', '-u', 'origin', branch_name) if push
94
92
  end
95
93
  end
96
94
 
97
95
  # `git add` the specified files (if any provided) then commit them using the provided message.
98
- # Optionally, push the commit to the remote too.
99
96
  #
100
97
  # @param [String] message The commit message to use
101
98
  # @param [String|Array<String>] files A file or array of files to git-add before creating the commit.
102
99
  # Use `nil` or `[]` if you already added the files in a separate step and don't wan't this method to add any new file before commit.
103
100
  # Also accepts the special symbol `:all` to add all the files (`git commit -a -m …`).
104
- # @param [Bool] push If true, will `git push` to `origin` after the commit has been created. Defaults to `false`.
105
101
  #
106
- # @return [Bool] True if commit and push were successful, false if there was an issue during commit & push (most likely being "nothing to commit").
102
+ # @return [Bool] True if commit was successful, false if there was an issue (most likely being "nothing to commit").
107
103
  #
108
- def self.commit(message:, files: nil, push: false)
104
+ def self.commit(message:, files: nil)
109
105
  files = [files] if files.is_a?(String)
110
106
  args = []
111
107
  if files == :all
@@ -115,7 +111,6 @@ module Fastlane
115
111
  end
116
112
  begin
117
113
  Action.sh('git', 'commit', *args, '-m', message)
118
- Action.sh('git', 'push', 'origin', 'HEAD') if push
119
114
  return true
120
115
  rescue
121
116
  return false
@@ -4,9 +4,9 @@ module Fastlane
4
4
  # Helper methods to execute git-related operations that are specific to iOS projects
5
5
  #
6
6
  module GitHelper
7
- # Commit and push the files that are modified when we bump version numbers on an iOS project
7
+ # Commit the files that are modified when we bump version numbers on an iOS project
8
8
  #
9
- # This typically commits and pushes:
9
+ # This typically commits:
10
10
  # - The files in `./config/*` – especially `Version.*.xcconfig` files
11
11
  # - The `fastlane/Deliverfile` file (which contains the `app_version` line)
12
12
  # - The `<ProjectRoot>/<ProjectName>/Resources/AppStoreStrings.pot` file, containing a key for that version's release notes
@@ -25,10 +25,10 @@ module Fastlane
25
25
  files_list.append File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'Resources', ENV['APP_STORE_STRINGS_FILE_NAME'])
26
26
  end
27
27
 
28
- Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list, push: true)
28
+ Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list)
29
29
  end
30
30
 
31
- # Calls the `Scripts/localize.py` script in the project root folder and push the `*.strings` files
31
+ # Calls the `Scripts/localize.py` script in the project root folder and commit the `*.strings` files
32
32
  #
33
33
  # That script updates the `.strings` files with translations from GlotPress.
34
34
  #
@@ -42,7 +42,7 @@ module Fastlane
42
42
  def self.localize_project
43
43
  Action.sh("cd #{get_from_env!(key: 'PROJECT_ROOT_FOLDER')} && ./Scripts/localize.py")
44
44
 
45
- Fastlane::Helper::GitHelper.commit(message: 'Update strings for localization', files: strings_files, push: true) || UI.message('No new strings, skipping commit')
45
+ Fastlane::Helper::GitHelper.commit(message: 'Update strings for localization', files: strings_files) || UI.message('No new strings, skipping commit')
46
46
  end
47
47
 
48
48
  # Call the `Scripts/update-translations.rb` then the `fastlane/download_metadata` Scripts from the host project folder
@@ -56,11 +56,11 @@ module Fastlane
56
56
  def self.update_metadata
57
57
  Action.sh("cd #{get_from_env!(key: 'PROJECT_ROOT_FOLDER')} && ./Scripts/update-translations.rb")
58
58
 
59
- Fastlane::Helper::GitHelper.commit(message: 'Update translations', files: strings_files, push: false)
59
+ Fastlane::Helper::GitHelper.commit(message: 'Update translations', files: strings_files)
60
60
 
61
61
  Action.sh('cd fastlane && ./download_metadata.swift')
62
62
 
63
- Fastlane::Helper::GitHelper.commit(message: 'Update metadata translations', files: './fastlane/metadata/', push: true)
63
+ Fastlane::Helper::GitHelper.commit(message: 'Update metadata translations', files: './fastlane/metadata/')
64
64
  end
65
65
 
66
66
  def self.strings_files
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Wpmreleasetoolkit
3
- VERSION = '7.1.2'
3
+ VERSION = '8.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-wpmreleasetoolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.2
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Automattic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-13 00:00:00.000000000 Z
11
+ date: 2023-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport