tworingtools 4.3.1 → 4.5.0

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: 2174408f19044e8e91f1658e7dcc4bc28ae44ff0b0fdfeab9766e3314c937535
4
- data.tar.gz: f91a05154a329e8529a679d66adf651b66f71b8e7c542b15d82de397d9fa1f41
3
+ metadata.gz: c53b0fa06130b5f11b2e688a6857abe68f1f28b49c2752899f34e052693f764c
4
+ data.tar.gz: dd9f84545c8e68e375379e203b357aedb0cdb7b50f6126057dd921804ecb4702
5
5
  SHA512:
6
- metadata.gz: a624262d5ecbfbd226a1f3bd5c3a3e135e1287499a1fef85893a42eaacbff19b8d2ad6688ea4f481743b98030836fa30620a26237bf7eea256e70266dbba2113
7
- data.tar.gz: d4390c3b4cf36b0575c3b461f6a32f9b5d76bb49994c0e81ea65aea632d0ecf75ea8143eea6a57f33ff9a673f4e6bf4ead46f2225818b15d340e316df6d25786
6
+ metadata.gz: 2fbf9378305e000180ff7238c4b4b44d757d9e75f137e27e96a5148c70e63d5e230f4c95934b74a071bc46285817478d364f21b52f91c531156a5fee42202b5b
7
+ data.tar.gz: 9e30706e07c4f0321a97d752fd302f07e2f2e6531e1b01c9ab9f117b2075eb52eba82cb9d0df04c6b8d1f135e50b7c3c9fb4690d609ec3acf0aafef1735df090
data/bin/bumpr CHANGED
@@ -18,6 +18,7 @@ parser = OptionParser.new do |opts|
18
18
 
19
19
  BANNER
20
20
  opts.on('-n', '--no-commit', 'Leave changes in the git working index instead of committing them.') do |no_commit| options[:no_commit] = true end
21
+ opts.on('-c', '--custom', 'Custom version to use for semantic component (or build number for "build" component).') do |custom| options[:custom] = custom end
21
22
  opts.on('-h', '--help', 'Print this help message.') do
22
23
  puts opts
23
24
  exit
@@ -43,7 +44,11 @@ if argument == nil then
43
44
  exit TwoRingToolError::INVALID_SEMVER_COMPONENT
44
45
  end
45
46
 
46
- command = "vrsn #{argument} --file #{version_file}"
47
+ invocation_options = Array.new
48
+ unless options[:custom] == nil then
49
+ invocation_options += ['--custom', options[:custom]]
50
+ end
51
+ command = "vrsn #{argument} --file #{version_file} #{invocation_options.join(' ')}"
47
52
  puts command
48
53
  stdout, stderr, status = Open3.capture3(command)
49
54
 
@@ -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
@@ -67,14 +68,16 @@ echo_and_exec "sed -i '' \"s/\\(\\.version *= *'\\).*'/\\1\"#{release_candidate_
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
@@ -26,7 +26,7 @@ parser = OptionParser.new do |opts|
26
26
  opts.on('-n', '--no-changelog', 'Skip operations that would normally update a CHANGELOG.md.') do |skip_changelog| options[:skip_changelog] = true end
27
27
  opts.on('-v', '--verbose', 'Pass \'--verbose\' to \'cocoapods spec lint\'.') do |name| options[:verbose] = true end
28
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
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
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
30
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
31
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
32
32
  opts.on('-h', '--help', 'Print this help message.') do
@@ -51,7 +51,7 @@ elsif options[:podspec_name_in_tag] then
51
51
  else
52
52
  tag_value = version
53
53
  end
54
- if options[:skip_changelog] then
54
+ unless options[:skip_changelog] then
55
55
  changelog_entry_name = String.new
56
56
  if options[:changelog_entry_name_override] != nil then
57
57
  changelog_entry_name = "--name " + options[:changelog_entry_name_override]
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.3.1
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight