tworingtools 4.0.1 → 4.1.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: e959ca054f860c6b68a13d6485c1fd1ce9b2186d2fe828850fbafef61135fc8b
4
- data.tar.gz: 9e7c099aaafa9f4dcb1e4df2f4f537e68c9a0b05cd9a3c8cec089d0b4262df22
3
+ metadata.gz: 16466bf2984dbc3a05e95e3208cad9414c0c94bb87d0c915083774bdd363ecfe
4
+ data.tar.gz: d8dc97b07602e173dbc040ceb41e5b3d3a7044e829d0344faee012bfacb82881
5
5
  SHA512:
6
- metadata.gz: 9fd5e2331f2f89cfc1083fb172fd5fbec5725d5f62f14de92a72475e76e65c9544b5ad0d3a7ccfdfab0f5a9746eea645125f0fcc91bc8c57ff2391840908253a
7
- data.tar.gz: 0a851c08e9a3908a0990fe9a3ec827e1700ad1d8b8154d058d63c065aa346c6bf16b8b31e188acbbc3dd0be38ab3f2a0c22887e8bf9a207ae493ca4c8972019c
6
+ metadata.gz: cdeb0282e4960dfdb932691fe7b2acf5acdd8c68686c72e0295047e627320a775b9b0dcc100d694d1ba10dad16fb3965e5311ed487e101e11ff39d78ec5cd129
7
+ data.tar.gz: a771775e2fb4378f3c279916b3c6794cab9005333e0b2b258ce9ada4908d177f8dd845ffa94b20907306d16eae93ef669fe1988e24b0244aa93decc468990055
@@ -25,9 +25,10 @@ parser = OptionParser.new do |opts|
25
25
  opts.on('-w', '--allow-warnings', 'Pass \'--allow-warnings\' to \'cocoapods spec lint\'.') do |force| options[:allow_warnings] = true end
26
26
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
27
27
  opts.on('-s', '--skip-tests', 'Pass \'--skip-tests\' to \'cocoapods spec lint\'.') do |skip_tests| options[:skip_tests] = true end
28
- opts.on('-n', '--podspec-name-in-tag', 'When forming the tag name for a release candidate, prefix the podspec‘s name to the version string. Helps when you have multiple podspecs in a repository and tag versions for each.') do |podspec_name_in_tag| options[:podspec_name_in_tag] = true end
28
+ opts.on('-p', '--podspec-name-in-tag', 'When forming the tag name for a release candidate, prefix the podspec‘s name to the version string. Helps when you have multiple podspecs in a repository and tag versions for each.') do |podspec_name_in_tag| options[:podspec_name_in_tag] = true end
29
29
  opts.on('-n', '--no-branch', 'Make any changes on the current branch instead of creating a temporary new branch.') do |no_branch| options[:no_branch] = true end
30
30
  opts.on('-cCHANGELOG', '--changelog=CHANGELOG', 'Location of a CHANGELOG document adhering to https://keepachangelog.com/en/1.0.0/ whose version entry should be extracted into an annotated tag for this release candidate.') do |changelog| options[:changelog] = changelog end
31
+ opts.on('-tTAG', '--tag=TAG', 'Override for the name of the git tag to form. If set, --podspec-name-in-tag is ignored.') do |tag| options[:tag] = tag end
31
32
  opts.on('-h', '--help', 'Print this help message.') do
32
33
  puts opts
33
34
  exit
@@ -48,7 +49,9 @@ release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip
48
49
  release_candidate_version = "#{version_root}#{release_candidate_number}"
49
50
 
50
51
  tag_value = String.new
51
- if options[:podspec_name_in_tag] then
52
+ if options[:tag] then
53
+ tag_value = options[:tag]
54
+ elsif options[:podspec_name_in_tag] then
52
55
  tag_value = "#{podspec}-#{release_candidate_version}"
53
56
  else
54
57
  tag_value = "#{release_candidate_version}"
@@ -22,10 +22,11 @@ parser = OptionParser.new do |opts|
22
22
  BANNER
23
23
  opts.on('-w', '--allow-warnings', 'Pass \'--allow-warnings\' to \'cocoapods spec lint\'.') do |force| options[:allow_warnings] = true end
24
24
  opts.on('-s', '--skip-tests', 'Pass \'--skip-tests\' to \'cocoapods spec lint\'.') do |skip_tests| options[:skip_tests] = true end
25
- opts.on('-n', '--podspec-name-in-tag', 'When forming the tag name for a release candidate, prefix the podspec‘s name to the version string. Helps when you have multiple podspecs in a repository and tag versions for each.') do |podspec_name_in_tag| options[:podspec_name_in_tag] = true end
25
+ opts.on('-p', '--podspec-name-in-tag', 'When forming the tag name for a release candidate, prefix the podspec‘s name to the version string. Helps when you have multiple podspecs in a repository and tag versions for each.') do |podspec_name_in_tag| options[:podspec_name_in_tag] = true end
26
26
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
27
27
  opts.on('-rREPO', '--repo=REPO', 'By default, release-podspec pushes the podspec to CocoaPods trunk. By supplying this argument, instead of \`pod trunk push\`, \`pod repo push\` is used instead.') do |repo| options[:repo] = repo end
28
28
  opts.on('-cCHANGELOG_PATH', '--changelog-path=CHANGELOG_PATH', 'By default, release-podspec looks for //CHANGELOG.md. You can specify another location with this option.') do |changelog_path| options[:changelog_path] = changelog_path end
29
+ opts.on('-tTAG', '--tag=TAG', 'Override for the name of the git tag to form. If set, --podspec-name-in-tag is ignored.') do |tag| options[:tag] = tag end
29
30
  opts.on('--e', '--changelog-entry=CHANGELOG_ENTRY', 'The name of the changelog entry, if it differs from the tag name.') do |changelog_entry_name_override| options[:changelog_entry_name_override] = changelog_entry_name_override end
30
31
  opts.on('-h', '--help', 'Print this help message.') do
31
32
  puts opts
@@ -41,15 +42,19 @@ if options[:changelog_path] != nil then
41
42
  changelog_path = options[:changelog_path]
42
43
  end
43
44
  version = `vrsn --read --file #{podspec_path}`.strip
44
- name_prefix = String.new
45
- if options[:podspec_name_in_tag] then
46
- name_prefix = podspec + '-'
45
+ tag_value = String.new
46
+ if options[:tag] then
47
+ tag_value = options[:tag]
48
+ elsif options[:podspec_name_in_tag] then
49
+ tag_value = podspec + '-' + version
50
+ else
51
+ tag_value = version
47
52
  end
48
53
  changelog_entry_name = String.new
49
54
  if options[:changelog_entry_name_override] != nil then
50
55
  changelog_entry_name = "--name " + options[:changelog_entry_name_override]
51
56
  end
52
- echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{name_prefix}#{version} #{changelog_entry_name}"
57
+ echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{tag_value} #{changelog_entry_name}"
53
58
  echo_and_exec 'git push --tags'
54
59
 
55
60
  spec_lint_flags = Array.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tworingtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight