tworingtools 4.0.1 → 4.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e959ca054f860c6b68a13d6485c1fd1ce9b2186d2fe828850fbafef61135fc8b
4
- data.tar.gz: 9e7c099aaafa9f4dcb1e4df2f4f537e68c9a0b05cd9a3c8cec089d0b4262df22
3
+ metadata.gz: 4fe07ff31edb8f170c5d7786f26b83b43ae6a22a778a8b3ee28e912c54638776
4
+ data.tar.gz: 5ce642e594775ac2447db3d9241e1cb31577b8b6c9e53f70a23fa3417da5fe01
5
5
  SHA512:
6
- metadata.gz: 9fd5e2331f2f89cfc1083fb172fd5fbec5725d5f62f14de92a72475e76e65c9544b5ad0d3a7ccfdfab0f5a9746eea645125f0fcc91bc8c57ff2391840908253a
7
- data.tar.gz: 0a851c08e9a3908a0990fe9a3ec827e1700ad1d8b8154d058d63c065aa346c6bf16b8b31e188acbbc3dd0be38ab3f2a0c22887e8bf9a207ae493ca4c8972019c
6
+ metadata.gz: 944ec25caf172ae3559df4a7d5c630f0b9a7eb5e3905ec67507d5f934cc40bb25200145bdf2e03c9983d8daa596d74cf0ac70fe5c9762d09cd241ccf847d647f
7
+ data.tar.gz: 20758e0eed9eb593bbf2defc56f81c341060c10dee376706fe041f7000e7f973af6627c6a3a77ae07cca8df90c3903da2accbc964b00fb3c221dc6288432a486
@@ -25,9 +25,11 @@ 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
32
+ opts.on('-rRC', '--release-candidate=RC', 'Override for the release candidate number, which is otherwise formulated by counting the previous amount of tags with the same version number and incrementing by one.') do |rc| options[:rc] = rc end
31
33
  opts.on('-h', '--help', 'Print this help message.') do
32
34
  puts opts
33
35
  exit
@@ -44,11 +46,18 @@ unless options[:no_branch] then
44
46
  end
45
47
 
46
48
  version_root = "#{current_version}-RC"
47
- release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip.to_i + 1
49
+ release_candidate_number = String.new
50
+ if options[:rc] then
51
+ release_candidate_number = options[:rc]
52
+ else
53
+ release_candidate_number = `git tag --list | grep #{version_root} | wc -l`.strip.to_i + 1
54
+ end
48
55
  release_candidate_version = "#{version_root}#{release_candidate_number}"
49
56
 
50
57
  tag_value = String.new
51
- if options[:podspec_name_in_tag] then
58
+ if options[:tag] then
59
+ tag_value = options[:tag]
60
+ elsif options[:podspec_name_in_tag] then
52
61
  tag_value = "#{podspec}-#{release_candidate_version}"
53
62
  else
54
63
  tag_value = "#{release_candidate_version}"
@@ -22,10 +22,12 @@ 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
+ opts.on('-n', '--no-changelog', 'Skip operations that would normally update a CHANGELOG.md.') do |skip_changelog| options[:skip_changelog] = true end
26
27
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
27
28
  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
29
  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
30
+ 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
31
  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
32
  opts.on('-h', '--help', 'Print this help message.') do
31
33
  puts opts
@@ -41,15 +43,23 @@ if options[:changelog_path] != nil then
41
43
  changelog_path = options[:changelog_path]
42
44
  end
43
45
  version = `vrsn --read --file #{podspec_path}`.strip
44
- name_prefix = String.new
45
- if options[:podspec_name_in_tag] then
46
- name_prefix = podspec + '-'
46
+ tag_value = String.new
47
+ if options[:tag] then
48
+ tag_value = options[:tag]
49
+ elsif options[:podspec_name_in_tag] then
50
+ tag_value = podspec + '-' + version
51
+ else
52
+ tag_value = version
47
53
  end
48
- changelog_entry_name = String.new
49
- if options[:changelog_entry_name_override] != nil then
50
- changelog_entry_name = "--name " + options[:changelog_entry_name_override]
54
+ unless options[:skip_changelog] then
55
+ changelog_entry_name = String.new
56
+ if options[:changelog_entry_name_override] != nil then
57
+ changelog_entry_name = "--name " + options[:changelog_entry_name_override]
58
+ end
59
+ echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{tag_value} #{changelog_entry_name}"
60
+ else
61
+ echo_and_exec "git tag #{tag_value}"
51
62
  end
52
- echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{name_prefix}#{version} #{changelog_entry_name}"
53
63
  echo_and_exec 'git push --tags'
54
64
 
55
65
  spec_lint_flags = Array.new
@@ -65,7 +75,7 @@ end
65
75
 
66
76
  command = String.new
67
77
  if options[:repo] != nil then
68
- command = "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '}"
78
+ command = "rbenv exec bundle exec pod repo push #{options[:repo]} #{spec_lint_flags.join ' '} #{podspec_path}"
69
79
  else
70
80
  command = "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
71
81
  end
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.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight