verto 0.4.1 → 0.5.0
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 +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +21 -6
- data/lib/verto.rb +4 -0
- data/lib/verto/commands/base_command.rb +4 -0
- data/lib/verto/commands/main_command.rb +6 -0
- data/lib/verto/commands/tag_command.rb +9 -2
- data/lib/verto/version.rb +1 -1
- data/verto.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 373195fc35ee48db23ce27dd6bc67105cb510761f7ea6eebe66a5f701bc86283
|
4
|
+
data.tar.gz: 296d975bf93678478a0b182265ec4c5d6f816d24b32520fcd9f1aadbf3f6999b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc6dad7a9b95e58284c7f59ed6bfeccb27339fdf8f6125117cde49ad7cfa951d5927b2578f47cb0b83c3c719e52b6be046fe6b77e43aa07e3877d297b0496b26
|
7
|
+
data.tar.gz: 65d0d53a12a166ce5c890c2f1349a21ff43726f3158df7df402d3c6170d9f70bc1a26375194302c35d512474c5bbcf4ef172b74cc5ef92b82a41ab025255cb14
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
verto (0.
|
4
|
+
verto (0.5.0)
|
5
5
|
dry-auto_inject (~> 0.7)
|
6
6
|
dry-configurable (~> 0.8)
|
7
7
|
dry-container (~> 0.7)
|
8
8
|
thor (~> 1.0.1)
|
9
|
-
vseries (~> 0.
|
9
|
+
vseries (~> 0.2)
|
10
10
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
@@ -46,7 +46,7 @@ GEM
|
|
46
46
|
simplecov-html (~> 0.11)
|
47
47
|
simplecov-html (0.12.2)
|
48
48
|
thor (1.0.1)
|
49
|
-
vseries (0.
|
49
|
+
vseries (0.2.0)
|
50
50
|
|
51
51
|
PLATFORMS
|
52
52
|
ruby
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Verto is a CLI to generate git tags (following the [Semantic Versioning](https:/
|
|
10
10
|
### Ruby Gem
|
11
11
|
Verto is distributed as a ruby gem, to install run:
|
12
12
|
|
13
|
-
```
|
13
|
+
```shell
|
14
14
|
$ gem install verto
|
15
15
|
```
|
16
16
|
|
@@ -31,20 +31,20 @@ You don't need to install verto in your machine, you can run verto via the docke
|
|
31
31
|
|
32
32
|
To use verto in the same way that you use any other cli, you can set an alias in your `.bashrc`, `.zshrc`, etc:
|
33
33
|
|
34
|
-
```
|
34
|
+
```shell
|
35
35
|
alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto:0.4.1'
|
36
36
|
```
|
37
37
|
|
38
38
|
If you want you can share your git configuration and known_hosts with:
|
39
39
|
|
40
|
-
```
|
40
|
+
```shell
|
41
41
|
alias verto='docker run -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -it catks/verto:0.4.1'
|
42
42
|
|
43
43
|
```
|
44
44
|
|
45
45
|
You can also use your ssh keys with verto container (for git push):
|
46
46
|
|
47
|
-
```
|
47
|
+
```shell
|
48
48
|
alias verto='docker run -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa -e SSH_PRIVATE_KEY=/root/.ssh/id_rsa -it catks/verto:0.4.1'
|
49
49
|
|
50
50
|
```
|
@@ -52,7 +52,7 @@ alias verto='docker run -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/ro
|
|
52
52
|
Or share the git config, known_hosts and ssh_keys:
|
53
53
|
|
54
54
|
|
55
|
-
```
|
55
|
+
```shell
|
56
56
|
alias verto='docker run -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa -e SSH_PRIVATE_KEY=/root/.ssh/id_rsa -it catks/verto:0.4.1'
|
57
57
|
|
58
58
|
```
|
@@ -63,10 +63,25 @@ Now you can run any verto command! :)
|
|
63
63
|
|
64
64
|
You can run verto right out of the box without any configuration:
|
65
65
|
|
66
|
-
```
|
66
|
+
```shell
|
67
67
|
verto tag up --patch # Creates a new tag increasing the patch number
|
68
68
|
verto tag up --minor # Creates a new tag increasing the minor number
|
69
69
|
verto tag up --major # Creates a new tag increasing the major number
|
70
|
+
|
71
|
+
# You can also work with pre release identifiers
|
72
|
+
verto tag up --major --pre_release=rc # Creates a new tag increasing the major number and adding the rc identifier
|
73
|
+
verto tag up --pre_release=rc # Creates a new tag increasing the pre_release number, eg: rc.1 to rc.2
|
74
|
+
|
75
|
+
# Or ensure that a release tag will be created, eg: with a last tag 1.1.1-rc.1
|
76
|
+
|
77
|
+
verto tag up --release # Creates a 1.1.1 tag
|
78
|
+
|
79
|
+
# You can filter the tags you want to consider for increasing
|
80
|
+
|
81
|
+
verto tag up --patch --filter=release_only # For Realease Tags Only
|
82
|
+
verto tag up --patch --filter=pre_release_only # For Pre Realease Tags Only
|
83
|
+
verto tag up --patch --filter='\d+\.\d+\.\d+-alpha.*' # Custom Regexp!
|
84
|
+
|
70
85
|
```
|
71
86
|
|
72
87
|
### Verto DSL
|
data/lib/verto.rb
CHANGED
@@ -7,6 +7,7 @@ module Verto
|
|
7
7
|
option :patch, type: :boolean, default: false
|
8
8
|
option :pre_release, type: :string
|
9
9
|
option :filter, type: :string
|
10
|
+
option :release, type: :boolean, default: false
|
10
11
|
|
11
12
|
def up
|
12
13
|
call_hooks(%i[before before_tag_up], with_attributes: { command_options: options} )
|
@@ -24,7 +25,10 @@ module Verto
|
|
24
25
|
validate_new_version!(new_version, latest_version)
|
25
26
|
|
26
27
|
call_hooks(:before_tag_creation, with_attributes: { new_version: new_version } )
|
28
|
+
|
29
|
+
stderr.puts "Creating Tag #{new_version}..."
|
27
30
|
tag_repository.create!(new_version.to_s)
|
31
|
+
stderr.puts "Tag #{new_version} Created!"
|
28
32
|
|
29
33
|
call_hooks(:after_tag_up, with_attributes: { new_version: new_version })
|
30
34
|
call_hooks(:after)
|
@@ -46,6 +50,10 @@ module Verto
|
|
46
50
|
new_version = new_version.up(:pre_release) if new_version.pre_release.name == version.pre_release.name && new_version == version
|
47
51
|
end
|
48
52
|
|
53
|
+
if options[:release]
|
54
|
+
new_version = new_version.release_version
|
55
|
+
end
|
56
|
+
|
49
57
|
new_version
|
50
58
|
end
|
51
59
|
|
@@ -85,8 +93,7 @@ module Verto
|
|
85
93
|
}
|
86
94
|
}
|
87
95
|
TEXT
|
88
|
-
) unless options[:major] || options[:minor] || options[:patch] || options[:pre_release]
|
89
|
-
|
96
|
+
) unless options[:major] || options[:minor] || options[:patch] || options[:pre_release] || options[:release]
|
90
97
|
end
|
91
98
|
|
92
99
|
def load_filter
|
data/lib/verto/version.rb
CHANGED
data/verto.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "dry-configurable", "~> 0.8"
|
31
31
|
spec.add_dependency "dry-container", "~> 0.7"
|
32
32
|
spec.add_dependency "dry-auto_inject", "~> 0.7"
|
33
|
-
spec.add_dependency "vseries", "~> 0.
|
33
|
+
spec.add_dependency "vseries", "~> 0.2"
|
34
34
|
|
35
35
|
spec.add_development_dependency "byebug"
|
36
36
|
spec.add_development_dependency "bundler", "~> 2.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: verto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Atkinson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.2'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|