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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 471a84a0013e6c3c02501ec32d3b45f09bf37d806bc94daeb5ef986d5ad11b33
4
- data.tar.gz: ff2c2b197c9473bf78468f0ef563968e1a34a4e191e10fffccba639e51c6d564
3
+ metadata.gz: bfde45c8eb00cd3302f89417e1302b90e2fd41a2fd49a5c402c6e29ec2e46fdf
4
+ data.tar.gz: d6822ed93c979646fc7c0064b39310a1a180ae632a92ea53b2a7b7841503c138
5
5
  SHA512:
6
- metadata.gz: 9426206069ea3f3a3d65f5ef2eb7ff95e97d1f89329d40f6e64f235590eaef80c713cf1ea1ba3700ea7ac4e0a9ed96a66a035109614d792734ae5693988ab819
7
- data.tar.gz: 52a1daaeaf66b8a84acffbd1b2f9b720fde0ca3275f8f4c0fd3dbad46ca7aa56e9540d5642415bb053129f8b4d548adaf959c1c033dafd89d4bf664e766d3bf5
6
+ metadata.gz: f93afd8ec28cfcf7a6183d82570da5e5636f23ffd1387c111de3bbbbddae2db114b7022207a953f47e45020f6069024a1cdeffca419aec6fe0ca0d923583fc78
7
+ data.tar.gz: c07c60169151793d64806ae93851aabd649233f2d8364fe1aba2e896a57c89054dfd634d37b69554f934219420964f76ae3b932504b7964a2f3c14b9aeb8fe57
@@ -1,3 +1,6 @@
1
+ ## 0.9.0 - 08/08/2020
2
+ * [FEATURE] Custom Default Pre-Release Identifier
3
+
1
4
  ## 0.8.0 - 05/05/2020
2
5
  * [PATCH] Handles Ctrl-C / SIGINT in CLI
3
6
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- verto (0.8.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.5)
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.8.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.8.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.8.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.8.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 QA"')
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 can be created in master or staging branch"
149
+ error "Tags can only be created in master or staging branch"
151
150
  exit
152
151
  }
153
152
  ```
@@ -13,6 +13,7 @@ module Verto
13
13
 
14
14
  setting :pre_release do
15
15
  setting :initial_number, 1
16
+ setting :default_identifier, 'rc'
16
17
  end
17
18
 
18
19
  setting :project do
@@ -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 { |key,value| value == true }.keys.map(&:to_sym) & [:major, :minor, :patch]
46
- up_option = up_options.sort.first
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 --patch),
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
@@ -1,4 +1,4 @@
1
- verto_version '0.8.0'
1
+ verto_version '0.9.0'
2
2
 
3
3
  config {
4
4
  # version.prefix = 'v' # Adds a version_prefix
@@ -1,3 +1,3 @@
1
1
  module Verto
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
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.8.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-05-05 00:00:00.000000000 Z
11
+ date: 2020-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor