verto 0.7.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +51 -0
- data/.rubocop.yml +23 -0
- data/.rubocop_todo.yml +50 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +18 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +47 -24
- data/README.md +31 -25
- data/Rakefile +7 -5
- data/Vertofile +5 -19
- data/bin/console +4 -3
- data/djin.yml +37 -0
- data/exe/verto +6 -4
- data/lib/verto.rb +55 -23
- data/lib/verto/commands/base_command.rb +7 -2
- data/lib/verto/commands/main_command.rb +10 -6
- data/lib/verto/commands/tag_command.rb +38 -24
- data/lib/verto/dsl.rb +2 -0
- data/lib/verto/dsl/built_in_hooks.rb +3 -1
- data/lib/verto/dsl/file.rb +4 -2
- data/lib/verto/dsl/hook.rb +2 -0
- data/lib/verto/dsl/interpreter.rb +8 -7
- data/lib/verto/dsl/syntax.rb +18 -7
- data/lib/verto/dsl/update_changelog.rb +60 -0
- data/lib/verto/repositories/tag_repository.rb +2 -0
- data/lib/verto/utils/cli_helpers.rb +15 -0
- data/lib/verto/utils/command_options.rb +4 -2
- data/lib/verto/utils/semantic_version.rb +2 -0
- data/lib/verto/utils/strict_hash.rb +9 -0
- data/lib/verto/utils/system_command_executor.rb +4 -2
- data/lib/verto/utils/tag_filter.rb +7 -5
- data/lib/verto/utils/template.rb +2 -0
- data/lib/verto/utils/templates/Vertofile +25 -28
- data/lib/verto/version.rb +3 -1
- data/verto.gemspec +29 -25
- metadata +55 -21
- data/.travis.yml +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e25eb48e99ebcf8a694fb9dd2756a302828612b4d514a16a5e81c06dcbaf2385
|
4
|
+
data.tar.gz: 0d67ea5fd94568c7ef881da2b0348f76b095c3c3234d08e60cfaf2c3a0b4ba03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fc4713f280b30ca32ba53331af2749899034f480cb8779562c5a3d90325cd70aee6790e2727ecc1ade83f38eb8ee85930e614fcc5e0b23f09ed630f2a0cfb62
|
7
|
+
data.tar.gz: 46f4ca5659357051ce2d981638af8ea75856b701e8e1570f0840d3de4f39845e4cf3c5aaddd58cdb157a0547af524bc30cefe2814fad1f57e25acee5aa64d763
|
@@ -0,0 +1,51 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-16.04
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: ['2.5', '2.6', '2.7', '3.0']
|
11
|
+
name: Ruby ${{ matrix.ruby }}
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
17
|
+
|
18
|
+
- name: Setup Code Climate test-reporter
|
19
|
+
run: |
|
20
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
21
|
+
chmod +x ./cc-test-reporter
|
22
|
+
./cc-test-reporter before-build
|
23
|
+
|
24
|
+
- name: Install Gems
|
25
|
+
run: |
|
26
|
+
gem install bundler
|
27
|
+
bundle install --jobs 4 --retry 3
|
28
|
+
|
29
|
+
- name: Run tests
|
30
|
+
run: |
|
31
|
+
git config --global user.email "github_actions@test.com"
|
32
|
+
git config --global user.name "Github Actions Test"
|
33
|
+
bundle exec rake
|
34
|
+
|
35
|
+
- name: Publish code coverage
|
36
|
+
run: |
|
37
|
+
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
|
38
|
+
./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}}
|
39
|
+
|
40
|
+
lint:
|
41
|
+
runs-on: ubuntu-16.04
|
42
|
+
name: Lint
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v2
|
45
|
+
- uses: actions/setup-ruby@v1
|
46
|
+
with:
|
47
|
+
ruby-version: '2.5'
|
48
|
+
- run: |
|
49
|
+
gem install bundler
|
50
|
+
bundle install --jobs 4 --retry 3
|
51
|
+
bundle exec rubocop
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# TODO: Remove and use pronto
|
2
|
+
inherit_from: .rubocop_todo.yml
|
3
|
+
|
4
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
5
|
+
# configuration file. It makes it possible to enable/disable
|
6
|
+
# certain cops (checks) and to alter their behavior if they accept
|
7
|
+
# any parameters. The file can be placed either in your home
|
8
|
+
# directory or in some project directory.
|
9
|
+
#
|
10
|
+
# RuboCop will start looking for the configuration file in the directory
|
11
|
+
# where the inspected file is and continue its way up to the root directory.
|
12
|
+
#
|
13
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
14
|
+
AllCops:
|
15
|
+
TargetRubyVersion: 2.5
|
16
|
+
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- 'spec/**/*.rb'
|
20
|
+
- verto.gemspec
|
21
|
+
|
22
|
+
Style/Documentation:
|
23
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 2000`
|
3
|
+
# on 2020-10-16 18:48:37 UTC using RuboCop version 0.93.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 4
|
10
|
+
# Configuration parameters: IgnoredMethods, Max.
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Exclude:
|
13
|
+
- 'lib/verto.rb'
|
14
|
+
- 'lib/verto/commands/tag_command.rb'
|
15
|
+
- 'lib/verto/utils/system_command_executor.rb'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Configuration parameters: IgnoredMethods, Max.
|
19
|
+
Metrics/CyclomaticComplexity:
|
20
|
+
Exclude:
|
21
|
+
- 'lib/verto/commands/tag_command.rb'
|
22
|
+
|
23
|
+
# Offense count: 4
|
24
|
+
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods.
|
25
|
+
Metrics/MethodLength:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/verto.rb'
|
28
|
+
- 'lib/verto/commands/tag_command.rb'
|
29
|
+
|
30
|
+
# Offense count: 1
|
31
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
32
|
+
Metrics/ModuleLength:
|
33
|
+
Exclude:
|
34
|
+
- 'lib/verto/dsl/syntax.rb'
|
35
|
+
|
36
|
+
# Offense count: 1
|
37
|
+
# Configuration parameters: IgnoredMethods, Max.
|
38
|
+
Metrics/PerceivedComplexity:
|
39
|
+
Exclude:
|
40
|
+
- 'lib/verto/commands/tag_command.rb'
|
41
|
+
|
42
|
+
# Offense count: 5
|
43
|
+
# Cop supports --auto-correct.
|
44
|
+
# Configuration parameters: AutoCorrect, Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
45
|
+
# URISchemes: http, https
|
46
|
+
Layout/LineLength:
|
47
|
+
Exclude:
|
48
|
+
- 'lib/verto/dsl/syntax.rb'
|
49
|
+
- 'lib/verto/dsl/update_changelog.rb'
|
50
|
+
- 'lib/verto/repositories/tag_repository.rb'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## 0.10.2 - 23/02/2021
|
2
|
+
* [TECH] Adds Ruby 3 in Github Actions
|
3
|
+
* [FIX] Update Changelog Typo
|
4
|
+
|
5
|
+
## 0.10.1 - 14/01/2021
|
6
|
+
* [FIX] UpdateChangelog Versions
|
7
|
+
* [TECH] Adds Rubocop
|
8
|
+
* [TECH] Github Actions CI
|
9
|
+
|
10
|
+
## 0.10.0 - 14/10/2020
|
11
|
+
* [FEATURE] Adds update_changelog in DSL
|
12
|
+
|
13
|
+
## 0.9.0 - 08/08/2020
|
14
|
+
* [FEATURE] Custom Default Pre-Release Identifier
|
15
|
+
|
16
|
+
## 0.8.0 - 05/05/2020
|
17
|
+
* [PATCH] Handles Ctrl-C / SIGINT in CLI
|
18
|
+
|
1
19
|
## 0.7.0 - 29/04/2020
|
2
20
|
* [FEATURE Built In Git Hooks]
|
3
21
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,51 +1,73 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
verto (0.
|
4
|
+
verto (0.10.2)
|
5
5
|
dry-auto_inject (~> 0.7)
|
6
6
|
dry-configurable (~> 0.8)
|
7
7
|
dry-container (~> 0.7)
|
8
|
+
mustache (~> 1.1.1)
|
8
9
|
thor (~> 1.0.1)
|
9
10
|
vseries (~> 0.2)
|
10
11
|
|
11
12
|
GEM
|
12
13
|
remote: https://rubygems.org/
|
13
14
|
specs:
|
15
|
+
ast (2.4.1)
|
14
16
|
byebug (11.1.1)
|
15
|
-
concurrent-ruby (1.1.
|
16
|
-
diff-lcs (1.
|
17
|
+
concurrent-ruby (1.1.8)
|
18
|
+
diff-lcs (1.4.4)
|
17
19
|
docile (1.3.2)
|
18
20
|
dry-auto_inject (0.7.0)
|
19
21
|
dry-container (>= 0.3.4)
|
20
|
-
dry-configurable (0.
|
22
|
+
dry-configurable (0.12.1)
|
21
23
|
concurrent-ruby (~> 1.0)
|
22
|
-
dry-core (~> 0.
|
23
|
-
dry-equalizer (~> 0.2)
|
24
|
+
dry-core (~> 0.5, >= 0.5.0)
|
24
25
|
dry-container (0.7.2)
|
25
26
|
concurrent-ruby (~> 1.0)
|
26
27
|
dry-configurable (~> 0.1, >= 0.1.3)
|
27
|
-
dry-core (0.
|
28
|
+
dry-core (0.5.0)
|
28
29
|
concurrent-ruby (~> 1.0)
|
29
|
-
|
30
|
+
json (2.3.1)
|
31
|
+
mustache (1.1.1)
|
32
|
+
parallel (1.19.2)
|
33
|
+
parser (2.7.2.0)
|
34
|
+
ast (~> 2.4.1)
|
35
|
+
rainbow (3.0.0)
|
30
36
|
rake (13.0.1)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
rspec-
|
35
|
-
|
36
|
-
rspec-
|
37
|
-
rspec-
|
37
|
+
regexp_parser (1.8.2)
|
38
|
+
rexml (3.2.4)
|
39
|
+
rspec (3.10.0)
|
40
|
+
rspec-core (~> 3.10.0)
|
41
|
+
rspec-expectations (~> 3.10.0)
|
42
|
+
rspec-mocks (~> 3.10.0)
|
43
|
+
rspec-core (3.10.1)
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-expectations (3.10.1)
|
38
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-mocks (3.
|
47
|
+
rspec-support (~> 3.10.0)
|
48
|
+
rspec-mocks (3.10.2)
|
41
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-support (3.
|
44
|
-
|
50
|
+
rspec-support (~> 3.10.0)
|
51
|
+
rspec-support (3.10.2)
|
52
|
+
rubocop (0.93.1)
|
53
|
+
parallel (~> 1.10)
|
54
|
+
parser (>= 2.7.1.5)
|
55
|
+
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.8)
|
57
|
+
rexml
|
58
|
+
rubocop-ast (>= 0.6.0)
|
59
|
+
ruby-progressbar (~> 1.7)
|
60
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
61
|
+
rubocop-ast (0.8.0)
|
62
|
+
parser (>= 2.7.1.5)
|
63
|
+
ruby-progressbar (1.10.1)
|
64
|
+
simplecov (0.17.1)
|
45
65
|
docile (~> 1.1)
|
46
|
-
|
47
|
-
|
66
|
+
json (>= 1.8, < 3)
|
67
|
+
simplecov-html (~> 0.10.0)
|
68
|
+
simplecov-html (0.10.2)
|
48
69
|
thor (1.0.1)
|
70
|
+
unicode-display_width (1.7.0)
|
49
71
|
vseries (0.2.0)
|
50
72
|
|
51
73
|
PLATFORMS
|
@@ -56,8 +78,9 @@ DEPENDENCIES
|
|
56
78
|
byebug
|
57
79
|
rake (~> 13.0)
|
58
80
|
rspec (~> 3.0)
|
59
|
-
|
81
|
+
rubocop
|
82
|
+
simplecov (~> 0.17.0)
|
60
83
|
verto!
|
61
84
|
|
62
85
|
BUNDLED WITH
|
63
|
-
2.
|
86
|
+
2.2.3
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Verto
|
2
|
-
|
2
|
+
![Build](https://github.com/catks/verto/workflows/Ruby/badge.svg)
|
3
3
|
[![Maintainability](https://api.codeclimate.com/v1/badges/b699d13df33e33bbe2d0/maintainability)](https://codeclimate.com/github/catks/verto/maintainability)
|
4
4
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/39e7c6f1f5f57b8555ed/test_coverage)](https://codeclimate.com/github/catks/verto/test_coverage)\
|
5
5
|
Verto is a CLI to generate git tags (following the [Semantic Versioning](https://semver.org/) system)
|
@@ -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 --rm -v $(pwd):/usr/src/project -it catks/verto:0.10.2'
|
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 --rm -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -it catks/verto:0.10.2'
|
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 --rm -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.10.2'
|
49
49
|
|
50
50
|
```
|
51
51
|
|
@@ -70,8 +70,8 @@ You can run verto right out of the box without any configuration:
|
|
70
70
|
|
71
71
|
# You can filter the tags you want to consider for increasing
|
72
72
|
|
73
|
-
verto tag up --patch --filter=release_only # For
|
74
|
-
verto tag up --patch --filter=pre_release_only # For Pre
|
73
|
+
verto tag up --patch --filter=release_only # For Release Tags Only
|
74
|
+
verto tag up --patch --filter=pre_release_only # For Pre Release Tags Only
|
75
75
|
verto tag up --patch --filter='\d+\.\d+\.\d+-alpha.*' # Custom Regexp!
|
76
76
|
|
77
77
|
```
|
@@ -85,42 +85,49 @@ 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.10.2'
|
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
|
95
|
+
|
96
|
+
## CHANGELOG FORMAT
|
97
|
+
## Verto uses Mustache template rendering to render changelog updates, the default value is:
|
98
|
+
##
|
99
|
+
## ## {{new_version}} - #{Time.now.strftime('%d/%m/%Y')}
|
100
|
+
## {{#version_changes}}
|
101
|
+
## * {{.}}
|
102
|
+
## {{/version_changes}}
|
103
|
+
##
|
104
|
+
## A custom format can be specified, eg:
|
105
|
+
# changelog.format = <<~CHANGELOG
|
106
|
+
# ## {{new_version}}
|
107
|
+
# {{#version_changes}}
|
108
|
+
# * {{.}}
|
109
|
+
# {{/version_changes}}
|
110
|
+
# CHANGELOG
|
94
111
|
}
|
95
112
|
|
96
113
|
context(branch('master')) {
|
97
114
|
before_command_tag_up {
|
98
|
-
git!('origin master')
|
99
115
|
command_options.add(filter: 'release_only')
|
100
116
|
}
|
101
117
|
|
102
118
|
before_tag_creation {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
puts "---------------------------"
|
108
|
-
version_changes = "## #{new_version} - #{Time.now.strftime('%d/%m/%Y')}\n#{version_changes}\n"
|
109
|
-
exit unless confirm("Create new Realease?\n" \
|
110
|
-
"---------------------------\n" \
|
111
|
-
"#{version_changes}" \
|
112
|
-
"---------------------------\n"
|
119
|
+
update_changelog(
|
120
|
+
with: :merged_pull_requests_with_bracketed_labels, # Optional, defines the strategy to retrive the changes, default: :merged_pull_requests_with_bracketed_labels
|
121
|
+
confirmation: true, # Optional, asks for confirmation before updating the changelog, default: true
|
122
|
+
filename: 'CHANGELOG.md' # Optional, defines the filename of the CHANGELOG file, default: 'CHANGELOG.md'
|
113
123
|
)
|
114
|
-
|
115
|
-
# CHANGELOG
|
116
|
-
file('CHANGELOG.md').prepend(version_changes)
|
117
124
|
git('add CHANGELOG.md')
|
118
125
|
|
119
126
|
# Uncomment to update the version in other files, like package.json
|
120
127
|
# file('package.json').replace(/"(\d+)\.(\d+)\.(\d+)(-?.*)"/, %Q{"#{new_version}"})
|
121
128
|
# git('add package.json')
|
122
129
|
|
123
|
-
git('commit -m "Updates CHANGELOG"')
|
130
|
+
git!('commit -m "Updates CHANGELOG"')
|
124
131
|
}
|
125
132
|
|
126
133
|
# After Hooks
|
@@ -140,14 +147,13 @@ context(branch('master')) {
|
|
140
147
|
# file('package.json').replace(/"(\d+)\.(\d+)\.(\d+)(-?.*)"/, %Q{"#{new_version}"})
|
141
148
|
# git('add package.json')
|
142
149
|
|
143
|
-
git('commit -m "Release
|
144
|
-
git('commit --allow-empty -m "Staging Release"')
|
150
|
+
git!('commit --allow-empty -m "Staging Release"')
|
145
151
|
}
|
146
152
|
}
|
147
153
|
|
148
154
|
# Block tag creation in other branchs
|
149
155
|
context(!branch('master', 'staging')) {
|
150
|
-
error "Tags only
|
156
|
+
error "Tags can only be created in master or staging branch"
|
151
157
|
exit
|
152
158
|
}
|
153
159
|
```
|
data/Rakefile
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require_relative 'lib/verto'
|
6
|
+
require_relative 'spec/helpers/test_repo.rb'
|
5
7
|
|
6
8
|
RSpec::Core::RakeTask.new(:spec)
|
7
9
|
|
8
|
-
task :
|
10
|
+
task default: :spec
|
9
11
|
|
10
12
|
desc 'Verto REPL'
|
11
13
|
task :console do
|
data/Vertofile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
verto_version '0.
|
1
|
+
verto_version '0.10.2'
|
2
2
|
|
3
3
|
config {
|
4
4
|
version.prefix = 'v' # Adds a version_prefix
|
@@ -12,22 +12,7 @@ context(branch('master')) {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
before_tag_creation {
|
15
|
-
|
16
|
-
bitbucket_changes = sh(
|
17
|
-
%q#git log --oneline --decorate | grep -B 100 -m 1 "tag:" | grep "pull request" | awk '{print $1}' | xargs git show --format='%b' | grep -v Approved | grep -v "^$" | grep -E "^[[:space:]]*\[.*\]" | sed 's/^[[:space:]]*\(.*\)/ * \1/'#, output: false
|
18
|
-
).output
|
19
|
-
version_changes = bitbucket_changes
|
20
|
-
|
21
|
-
puts "---------------------------"
|
22
|
-
version_changes = "## #{new_version} - #{Time.now.strftime('%d/%m/%Y')}\n#{version_changes}\n"
|
23
|
-
exit unless confirm("Create new Realease?\n" \
|
24
|
-
"---------------------------\n" \
|
25
|
-
"#{version_changes}" \
|
26
|
-
"---------------------------\n"
|
27
|
-
)
|
28
|
-
|
29
|
-
# CHANGELOG
|
30
|
-
file('CHANGELOG.md').prepend(version_changes)
|
15
|
+
update_changelog
|
31
16
|
git!('add CHANGELOG.md')
|
32
17
|
|
33
18
|
file('lib/verto/version.rb').replace(latest_version.to_s, new_version.to_s)
|
@@ -37,7 +22,9 @@ context(branch('master')) {
|
|
37
22
|
git!('add README.md')
|
38
23
|
|
39
24
|
file('lib/verto/utils/templates/Vertofile').replace(latest_version.to_s, new_version.to_s)
|
40
|
-
|
25
|
+
file('Vertofile').replace(latest_version.to_s, new_version.to_s)
|
26
|
+
|
27
|
+
git!('add Vertofile lib/verto/utils/templates/Vertofile')
|
41
28
|
|
42
29
|
sh!('bundle install')
|
43
30
|
sh!('rake install')
|
@@ -46,4 +33,3 @@ context(branch('master')) {
|
|
46
33
|
git!('commit -m "Bumps Version"')
|
47
34
|
}
|
48
35
|
}
|
49
|
-
|