tworingtools 3.0.0 → 3.0.1

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: 7866367d352702c57d29d4a3ab4047cb515203315d9ca4fed738b870f1302ccb
4
- data.tar.gz: 3ef7172b8f3acb80f7bc46a646089390e214dd39409c037a165ba2b33ad07197
3
+ metadata.gz: 0d1e943f0032f7f125bdefd52aebd9c5d6402116c9eb9f79b784e8a3579eb8f8
4
+ data.tar.gz: e5ca242d35928396d457048f6f0d76a24a3af54f9b7fa17462a9cfa383a7a90f
5
5
  SHA512:
6
- metadata.gz: 98f4c27f1f5f5dedf4d1bd3dfa52b59988e2aee2bd0121e455eca8c4692f82c4728c28bc63c599d376fc0796914f78e39b0f1192aae1d3f24ecfd08d2b080860
7
- data.tar.gz: a90f88aff5b56b284a83fd05913935c6db5b172110f6b6ce85badf1b0c02a052bc5fab3ac1bbb819e2d0901009c139c773f0e73db4f2d0d3ddbaf014a5005f6b
6
+ metadata.gz: 7c4f49838b822c793ca96090ec9bd3851aa923bcd104382c57b861fcfdbf70ecd554f3cfe2b722acaebea081805dbabacddef0c08f08df5a4c16f9252cecdfdd
7
+ data.tar.gz: ed215d75ba0f9be16868cdc42d5c0f4f1a7086e5ed1fdcf11769a393a6d18753b06b9e2e20c0c697a15233697abb3f85959d2abab082a3b5a244aea6b0fc68d6
data/bin/bumpr CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'optparse'
4
4
  require_relative '../lib/echoexec'
5
- require_relative '../lib/error'
5
+ require_relative '../lib/errors'
6
6
  require_relative '../lib/git_check'
7
7
 
8
8
  options = {}
@@ -25,7 +25,7 @@ parser = OptionParser.new do |opts|
25
25
  end
26
26
  parser.parse!
27
27
 
28
- git_check
28
+ git_check unless options[:no_commit]
29
29
 
30
30
  component = ARGV[0]
31
31
  version_file = ARGV[1]
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'optparse'
4
4
  require_relative '../lib/echoexec'
5
- require_relative '../lib/error'
5
+ require_relative '../lib/errors'
6
6
  require_relative '../lib/git_check'
7
7
 
8
8
  options = {}
@@ -15,7 +15,7 @@ parser = OptionParser.new do |opts|
15
15
 
16
16
  For normal usage, provide the path to the changelog from which to extract release notes, and the git tag name for which you'd like to extract release notes. This pulls the relevant section from your changelog, as long as you adhere to the format described at http://keepachangelog.com/en/1.0.0/.
17
17
 
18
- Note that the specification requires using the '#' character for hierarchical organization. Conveniently, this also renders different header styles with markdown. Unfortunately, that character is used to denote comments in git tag annotations (similar to git commit messages). So, before using changetag, you must change this to a different character:
18
+ Note that the specification requires using the '#' character for hierarchical organization. Conveniently, this also renders different header styles with markdown. Unfortunately, that character is used to denote comments in git tag annotations (similar to git commit messages). So, before using changetag, you must change this to a different character:
19
19
 
20
20
  $> git config core.commentchar "@"
21
21
 
@@ -37,7 +37,7 @@ parser = OptionParser.new do |opts|
37
37
  end
38
38
  parser.parse!
39
39
 
40
- git_check
40
+ git_check unless options[:no_commit]
41
41
 
42
42
  # set valid git message comment character
43
43
 
@@ -73,9 +73,9 @@ end
73
73
  =end
74
74
 
75
75
  changelog_contents = File.open(changelog_path).readlines
76
- if options[:name] != nil then
76
+ if options[:name] != nil then
77
77
  entry_name = options[:name]
78
- else
78
+ else
79
79
  entry_name = git_tag
80
80
  end
81
81
 
@@ -20,7 +20,7 @@ parser = OptionParser.new do |opts|
20
20
  end
21
21
  parser.parse!
22
22
 
23
- git_check
23
+ git_check unless options[:no_commit]
24
24
 
25
25
  changelog_path = ARGV[0]
26
26
  version = ARGV[1]
@@ -33,7 +33,7 @@ parser = OptionParser.new do |opts|
33
33
  end
34
34
  parser.parse!
35
35
 
36
- git_check
36
+ git_check unless options[:no_commit]
37
37
 
38
38
  version_file = "#{podspec}.podspec"
39
39
 
@@ -26,14 +26,14 @@ parser = OptionParser.new do |opts|
26
26
  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
27
27
  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
28
28
  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
29
- opts.on('-h', '--help', 'Print this help message.') do
29
+ opts.on('-h', '--help', 'Print this help message.') do
30
30
  puts opts
31
31
  exit
32
32
  end
33
33
  end
34
34
  parser.parse!
35
35
 
36
- git_check
36
+ git_check unless options[:no_commit]
37
37
 
38
38
  changelog_path = 'CHANGELOG.md'
39
39
  if options[:changelog_path] != nil then
@@ -51,7 +51,7 @@ end
51
51
  echo_and_exec "rbenv exec bundle exec changetag #{changelog_path} #{name_prefix}#{version} #{changelog_entry_name}"
52
52
  echo_and_exec 'git push --tags'
53
53
 
54
- spec_lint_flags = Array.new
54
+ spec_lint_flags = Array.new
55
55
  if options[:allow_warnings] != nil then
56
56
  spec_lint_flags << '--allow-warnings'
57
57
  end
@@ -80,4 +80,3 @@ if status != 0 then
80
80
  else
81
81
  puts "Podspec pushed successfully!"
82
82
  end
83
-
@@ -0,0 +1,8 @@
1
+ module TwoRingToolError
2
+ INVALID_CHANGELOG_PATH = 65
3
+ UNFORCED_ANNOTATION_OVERWRITE_ATTEMPT = 66
4
+ CHANGELOG_ENTRY_NOT_FOUND = 67
5
+ GIT_DIRTY_INDEX = 68
6
+ PODSPEC_PUSH_FAILED = 69
7
+ INVALID_SEMVER_COMPONENT = 70
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'open3'
2
+ require_relative 'errors'
3
+
4
+ def git_check
5
+ modified_file_count, stderr, status = Open3.capture3("git status --porcelain | egrep '^(M| M)' | wc -l")
6
+ if modified_file_count.to_i > 0 then
7
+ puts 'Please commit all changes to working index before proceeding.'
8
+ exit TwoRingToolError::GIT_DIRTY_INDEX
9
+ end
10
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tworingtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew McKnight
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-04 00:00:00.000000000 Z
11
+ date: 2020-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api
@@ -72,6 +72,8 @@ files:
72
72
  - bin/sync-forks
73
73
  - bin/xcsims
74
74
  - lib/echoexec.rb
75
+ - lib/errors.rb
76
+ - lib/git_check.rb
75
77
  homepage: https://github.com/TwoRingSoft/tools
76
78
  licenses:
77
79
  - MIT