tworingtools 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bumpr +13 -8
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96d48d8821806f99ee56aff430dba969b47b0e26744f023eec74831d365be3cc
4
- data.tar.gz: dc806e91396045bc9bfaf34f4dc27d0738d7f3158cf778221f6f26c026ff817e
3
+ metadata.gz: 4345e37e847c8727beba43d2538cd56a7c1b2614a3dc854fad8fee43655a6b30
4
+ data.tar.gz: e1c6774ce2efa864d5092c769f1fe9a29e7664a30ad9976bf081de4d2da91bbb
5
5
  SHA512:
6
- metadata.gz: ec3cd00c985131dd24196c13ef113a6238f81c98c2ceee19b7592c79b0d731881603134be2884202eae93ee814115afa9ce9be71232c265c9ab75db387c89d33
7
- data.tar.gz: 75150c44d5dcd82e5688be52876974ac44eead4b22c27e4bc696114683d43a2d597406fa4ef23662d94059765c2d19263df7bcd4469f8703534f5054cdcbf2b4
6
+ metadata.gz: ab156cda589e379c370c688ff513730462af02c986e91ecce7572e486de872dd31fa41c52974e4737221d93321bd192c64c18a6379e878b3314762b6ff34615f
7
+ data.tar.gz: 73cc10c48f523aa663571e2cfaeb737abc1d60c94264dcd9e37f97318992144fc0c356345cb17dd3907237907dcb3cbc6126bb5062bff70a06cef2649333fce8
data/bin/bumpr CHANGED
@@ -16,16 +16,19 @@ parser = OptionParser.new do |opts|
16
16
  - "build" numeric build numbers
17
17
 
18
18
  BANNER
19
- opts.on('-h', '--help', 'Print this help message.') do
19
+ opts.on('-n', '--no-commit', 'Leave changes in the git working index instead of committing them.') do |no_commit| options[:no_commit] = true end
20
+ opts.on('-h', '--help', 'Print this help message.') do
20
21
  puts opts
21
22
  exit
22
23
  end
23
24
  end
24
25
  parser.parse!
25
26
 
26
- modified_file_count, stderr, status = Open3.capture3("git status --porcelain | egrep '^(M| M)' | wc -l")
27
- if modified_file_count.to_i > 0 then
28
- echo_and_exec 'git stash'
27
+ unless options[:no_commit] then
28
+ modified_file_count, stderr, status = Open3.capture3("git status --porcelain | egrep '^(M| M)' | wc -l")
29
+ if modified_file_count.to_i > 0 then
30
+ echo_and_exec 'git stash'
31
+ end
29
32
  end
30
33
 
31
34
  component = ARGV[0]
@@ -48,9 +51,11 @@ command = "vrsn #{argument} --file #{version_file}"
48
51
  puts command
49
52
  stdout, stderr, status = Open3.capture3(command)
50
53
 
51
- echo_and_exec "git add #{version_file}"
52
- echo_and_exec "git commit --message \"#{stdout}\""
54
+ unless options[:no_commit] then
55
+ echo_and_exec "git add #{version_file}"
56
+ echo_and_exec "git commit --message \"#{stdout}\""
53
57
 
54
- if modified_file_count.to_i > 0 then
55
- echo_and_exec "git stash pop"
58
+ if modified_file_count.to_i > 0 then
59
+ echo_and_exec "git stash pop"
60
+ end
56
61
  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: 1.12.0
4
+ version: 1.13.0
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-03-20 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api