autogitc 0.3.0 → 0.3.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/autogitc +13 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aba172777c4e300d27d6f4133ad6b06dee61e88a3df93bcb002c2f2201c5ca6b
4
- data.tar.gz: b35eec122e676f8383f28c1ac797fbebe3388023738bb0b4177621f27c6d62d7
3
+ metadata.gz: 52e7d94f98de52c902808baecc724449f56128cf85a6b9a308892139789cb80d
4
+ data.tar.gz: da9da262b2e2e597cdbe7f273b1c8def5df7bac9bfcdad7ace272fb124b8a8fb
5
5
  SHA512:
6
- metadata.gz: '069a4f1e5db369d41f9498e5b6b731ef68877b0445d456f79c84023b8e188ac3538edf5c0489eaa2573c1a526221789d1b840efdebfd1fb8b2c81336a179f914'
7
- data.tar.gz: f287b580a2c99637e39ce64191ef69f1495e6aae12e0d79665d75c18321f99f7ab3177658fd71e787eb3d2029f65817f16969006c365464a38edbac7d6529867
6
+ metadata.gz: 47a2f05c942e884654eb3defa7b689f4bc022bdbc025742e5c9def0424ba9090ac54153f5337ea27f778d953d33418bda80bc41b57f8e9a9373f5d6f5da86eda
7
+ data.tar.gz: 95aaf9bfab1898e1104c341e695f0a458669603e3d4ba5f75589a4ccaf466fe154b06a715a92537a8efa235ee3eee0d0a9817791d19bb42fea07a94f9c8bfc0b
data/bin/autogitc CHANGED
@@ -3,6 +3,12 @@ require 'bundler/setup'
3
3
  require_relative '../lib/commit_generator'
4
4
  require_relative '../lib/pr_template_generator'
5
5
 
6
+ if ARGV.include?('--version')
7
+ gemspec = Gem::Specification.load('autogitc.gemspec')
8
+ puts "autogitc version #{gemspec.version}"
9
+ exit
10
+ end
11
+
6
12
  if ARGV.include?('pr')
7
13
  base_branch_arg = ARGV.find { |arg| arg.start_with?('--base=') }
8
14
  base_branch = base_branch_arg ? base_branch_arg.split('=').last : 'main'
@@ -10,10 +16,11 @@ if ARGV.include?('pr')
10
16
 
11
17
  puts 'Running PR template generator...'
12
18
  PrTemplateGenerator.main(base_branch: base_branch)
13
- else
14
- no_commit = ARGV.include?('--nocommit') || ARGV.include?('--nc')
15
- must_have_text = ARGV.find { |arg| arg.start_with?('--text=') }&.split('=')&.last
16
-
17
- puts 'Running autogitc...'
18
- CommitGenerator.main(no_commit: no_commit, must_have_text: must_have_text)
19
+ exit
19
20
  end
21
+
22
+ no_commit = ARGV.include?('--nocommit') || ARGV.include?('--nc')
23
+ must_have_text = ARGV.find { |arg| arg.start_with?('--text=') }&.split('=')&.last
24
+
25
+ puts 'Running autogitc...'
26
+ CommitGenerator.main(no_commit: no_commit, must_have_text: must_have_text)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autogitc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Goh