verto 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +2 -2
- data/README.md +8 -9
- data/lib/verto.rb +1 -0
- data/lib/verto/commands/tag_command.rb +8 -4
- data/lib/verto/utils/templates/Vertofile +1 -1
- data/lib/verto/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfde45c8eb00cd3302f89417e1302b90e2fd41a2fd49a5c402c6e29ec2e46fdf
|
4
|
+
data.tar.gz: d6822ed93c979646fc7c0064b39310a1a180ae632a92ea53b2a7b7841503c138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f93afd8ec28cfcf7a6183d82570da5e5636f23ffd1387c111de3bbbbddae2db114b7022207a953f47e45020f6069024a1cdeffca419aec6fe0ca0d923583fc78
|
7
|
+
data.tar.gz: c07c60169151793d64806ae93851aabd649233f2d8364fe1aba2e896a57c89054dfd634d37b69554f934219420964f76ae3b932504b7964a2f3c14b9aeb8fe57
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
verto (0.
|
4
|
+
verto (0.9.0)
|
5
5
|
dry-auto_inject (~> 0.7)
|
6
6
|
dry-configurable (~> 0.8)
|
7
7
|
dry-container (~> 0.7)
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
docile (1.3.2)
|
18
18
|
dry-auto_inject (0.7.0)
|
19
19
|
dry-container (>= 0.3.4)
|
20
|
-
dry-configurable (0.11.
|
20
|
+
dry-configurable (0.11.6)
|
21
21
|
concurrent-ruby (~> 1.0)
|
22
22
|
dry-core (~> 0.4, >= 0.4.7)
|
23
23
|
dry-equalizer (~> 0.2)
|
data/README.md
CHANGED
@@ -32,20 +32,20 @@ You don't need to install verto in your machine, you can run verto via the docke
|
|
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
|
-
alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto:0.
|
35
|
+
alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto:0.9.0'
|
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
|
-
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.
|
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.9.0'
|
42
42
|
|
43
43
|
```
|
44
44
|
|
45
45
|
You can also use your ssh keys, know_hosts and git config with verto container (for git push):
|
46
46
|
|
47
47
|
```shell
|
48
|
-
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.
|
48
|
+
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.9.0'
|
49
49
|
|
50
50
|
```
|
51
51
|
|
@@ -85,17 +85,17 @@ You can create a new Vertofile with `verto init` or following the next example:
|
|
85
85
|
```ruby
|
86
86
|
# Vertofile
|
87
87
|
|
88
|
-
verto_version '0.
|
88
|
+
verto_version '0.9.0'
|
89
89
|
|
90
90
|
config {
|
91
91
|
# version.prefix = 'v' # Adds a version_prefix
|
92
|
+
# pre_release.default_identifier = 'alpha' } # Defaults to 'rc'
|
92
93
|
git.pull_before_tag_creation = true # Pull Changes before tag creation
|
93
94
|
git.push_after_tag_creation = true # Push changes after tag creation
|
94
95
|
}
|
95
96
|
|
96
97
|
context(branch('master')) {
|
97
98
|
before_command_tag_up {
|
98
|
-
git!('origin master')
|
99
99
|
command_options.add(filter: 'release_only')
|
100
100
|
}
|
101
101
|
|
@@ -120,7 +120,7 @@ context(branch('master')) {
|
|
120
120
|
# file('package.json').replace(/"(\d+)\.(\d+)\.(\d+)(-?.*)"/, %Q{"#{new_version}"})
|
121
121
|
# git('add package.json')
|
122
122
|
|
123
|
-
git('commit -m "Updates CHANGELOG"')
|
123
|
+
git!('commit -m "Updates CHANGELOG"')
|
124
124
|
}
|
125
125
|
|
126
126
|
# After Hooks
|
@@ -140,14 +140,13 @@ context(branch('master')) {
|
|
140
140
|
# file('package.json').replace(/"(\d+)\.(\d+)\.(\d+)(-?.*)"/, %Q{"#{new_version}"})
|
141
141
|
# git('add package.json')
|
142
142
|
|
143
|
-
git('commit -m "Release
|
144
|
-
git('commit --allow-empty -m "Staging Release"')
|
143
|
+
git!('commit --allow-empty -m "Staging Release"')
|
145
144
|
}
|
146
145
|
}
|
147
146
|
|
148
147
|
# Block tag creation in other branchs
|
149
148
|
context(!branch('master', 'staging')) {
|
150
|
-
error "Tags only
|
149
|
+
error "Tags can only be created in master or staging branch"
|
151
150
|
exit
|
152
151
|
}
|
153
152
|
```
|
data/lib/verto.rb
CHANGED
@@ -42,13 +42,13 @@ module Verto
|
|
42
42
|
include Verto.import['tag_repository']
|
43
43
|
|
44
44
|
def up_version(version, options)
|
45
|
-
up_options = options.select { |
|
46
|
-
up_option = up_options.
|
45
|
+
up_options = options.select { |_, value| value == true }.keys.map(&:to_sym) & [:major, :minor, :patch]
|
46
|
+
up_option = up_options.min
|
47
47
|
|
48
48
|
new_version = version.up(up_option)
|
49
49
|
|
50
50
|
if options[:pre_release]
|
51
|
-
identifier = pre_release_configured? ? options[:pre_release] : version.pre_release.name
|
51
|
+
identifier = pre_release_configured? ? options[:pre_release] : version.pre_release.name || default_identifier
|
52
52
|
new_version = new_version.with_pre_release(identifier)
|
53
53
|
new_version = new_version.up(:pre_release) if new_version.pre_release.name == version.pre_release.name && new_version == version
|
54
54
|
end
|
@@ -77,7 +77,7 @@ module Verto
|
|
77
77
|
command_error!(
|
78
78
|
<<~TEXT
|
79
79
|
New version(#{new_version}) can't be equal or lower than latest version(#{latest_version})
|
80
|
-
run up --pre-release with --patch, --minor or --major (eg: verto tag up --pre-release
|
80
|
+
run up --pre-release with --patch, --minor or --major (eg: verto tag up --patch --pre-release=rc),
|
81
81
|
add filters (eg: verto tag up --pre-release --filter=pre_release_only)
|
82
82
|
or disable tag validation in Vertofile with config.version.validations.new_version_must_be_bigger = false
|
83
83
|
TEXT
|
@@ -111,5 +111,9 @@ module Verto
|
|
111
111
|
Verto.config.hooks.prepend Verto::DSL::BuiltInHooks::GitPullCurrentBranch if Verto.config.git.pull_before_tag_creation
|
112
112
|
Verto.config.hooks << Verto::DSL::BuiltInHooks::GitPushCurrentBranch if Verto.config.git.push_after_tag_creation
|
113
113
|
end
|
114
|
+
|
115
|
+
def default_identifier
|
116
|
+
Verto.config.pre_release.default_identifier
|
117
|
+
end
|
114
118
|
end
|
115
119
|
end
|
data/lib/verto/version.rb
CHANGED
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.9.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-
|
11
|
+
date: 2020-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|