tworingtools 4.2.0 → 4.4.1

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: c8bc4d66ed425f70865ff455a17d5f0cc03af48003f7e994d7cad3d7a4708a4b
4
- data.tar.gz: 2f030b6eb9d7fc50105fb91af19ca1d6abf226e896d035665497f2b497e223bd
3
+ metadata.gz: 385ea4238321cf778b1412ed2a9e6eaa5550be15b7c5aeaad86e2f6aaef1a9ab
4
+ data.tar.gz: 03bbbb6a58db914009a96ea709624480aee3c1c6c9f71d0c8caf30e57e0ab1b6
5
5
  SHA512:
6
- metadata.gz: 55a216baf1583ebab6759bc0a425079841f1f5ad92fa50301623f7997b2a2ef537e3cca6e956f77e5aacaf2809168f4b0e342c3c28478d6f6a5c253a0ffad5cc
7
- data.tar.gz: 468218eb24849365f2482d50fdafe29eafdafcd7fc45e004f5e2a92719b834e8ec2ea2087bbf5b1a753cbec311914f7aebadcef94d0d43d7b47e9a15ac968ae6
6
+ metadata.gz: bf1fc845bb26f6873fb3046a73d91bee3c9c0936a23fe15875672245d476efb2f6ce384b3eb1e21a5179afe4b377bfeb9711532ec994f55fb7886398ca4a6ee6
7
+ data.tar.gz: 633394bd194098ef47e88b7cca40a708fa3a30828dc19f29c9fc988aebc480c72cc9a997d8e28bcc5446533d1b66aa92fcb8b67f4f112dad19ff46e7e49ddb6d
@@ -27,8 +27,9 @@ parser = OptionParser.new do |opts|
27
27
  opts.on('-s', '--skip-tests', 'Pass \'--skip-tests\' to \'cocoapods spec lint\'.') do |skip_tests| options[:skip_tests] = true end
28
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
- 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
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. Ignored if --no-tag is specified.') do |changelog| options[:changelog] = changelog end
31
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('-t', '--no-tag', 'Don\'t create a git tag to push. Usually used if this will be invoked again for another spec that will create and use the same tag.') do |no_tag| options[:no_tag] = true end
32
33
  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
33
34
  opts.on('-h', '--help', 'Print this help message.') do
34
35
  puts opts
@@ -63,18 +64,20 @@ else
63
64
  tag_value = "#{release_candidate_version}"
64
65
  end
65
66
 
66
- echo_and_exec "sed -i '' \"s/\\(\\.version *= *'\\).*'/\\1\"#{release_candidate_version}\"\\'/g\" #{version_file}"
67
+ echo_and_exec "sed -i '' \"s/\\(\\.version *= *'\\).*'/\\1\"#{tag_value}\"\\'/g\" #{version_file}"
67
68
  echo_and_exec "git add #{version_file}"
68
69
  echo_and_exec "git commit --message 'chore(#{podspec}): set to release candidate version'"
69
70
 
70
- if options[:changelog] then
71
- echo_and_exec 'git config core.commentchar @'
72
- echo_and_exec "rbenv exec bundle exec changetag --name #{current_version} #{options[:changelog]} #{tag_value}"
73
- echo_and_exec 'git config core.commentchar #'
74
- else
75
- echo_and_exec "git tag #{tag_value}"
71
+ unless options[:no_tag] then
72
+ if options[:changelog] then
73
+ echo_and_exec 'git config core.commentchar @'
74
+ echo_and_exec "rbenv exec bundle exec changetag --name #{current_version} #{options[:changelog]} #{tag_value}"
75
+ echo_and_exec 'git config core.commentchar #'
76
+ else
77
+ echo_and_exec "git tag #{tag_value}"
78
+ end
79
+ echo_and_exec 'git push --tags'
76
80
  end
77
- echo_and_exec 'git push --tags'
78
81
 
79
82
  puts "About to lint the podspec. This takes a while... (it is now #{Time.now})"
80
83
  spec_lint_flags = Array.new
@@ -23,9 +23,10 @@ parser = OptionParser.new do |opts|
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
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
- 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('-cCHANGELOG_PATH', '--changelog-path=CHANGELOG_PATH', '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. 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
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
30
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
31
32
  opts.on('-h', '--help', 'Print this help message.') do
@@ -50,11 +51,15 @@ elsif options[:podspec_name_in_tag] then
50
51
  else
51
52
  tag_value = version
52
53
  end
53
- changelog_entry_name = String.new
54
- if options[:changelog_entry_name_override] != nil then
55
- 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}"
56
62
  end
57
- echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{tag_value} #{changelog_entry_name}"
58
63
  echo_and_exec 'git push --tags'
59
64
 
60
65
  spec_lint_flags = Array.new
@@ -70,7 +75,7 @@ end
70
75
 
71
76
  command = String.new
72
77
  if options[:repo] != nil then
73
- 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}"
74
79
  else
75
80
  command = "rbenv exec bundle exec pod trunk push #{podspec_path} #{spec_lint_flags.join ' '}"
76
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.2.0
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight