bump 0.6.0 → 0.6.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.
- checksums.yaml +4 -4
- data/README.md +35 -20
- data/bin/bump +1 -0
- data/lib/bump.rb +7 -1
- data/lib/bump/tasks.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1667a11fae813507f2b4f6a105774f96f9a28a2d
|
4
|
+
data.tar.gz: bdc45d4d01fe2753c5711e39c516170abda8740f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 672a2823801f52f781f06d677ec8d7e53318bdf766675b674707e9c2288be6066b4912b122f3dc4824e15fc96ae4f8e1245545be92876168b1c7d47fdd25cb40
|
7
|
+
data.tar.gz: bce54abe9b989efa56252c060aae3ffcf0c543a2e40149d5bce9df4ff2fbadddfd3d41b5548f5d5c7ee52aea0dda8e4202d25f795105964677e3a10b34c12b85
|
data/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
[](http://badge.fury.io/rb/bump)
|
3
3
|
|
4
4
|
# Introduction
|
5
|
-
Bump is a gem that will simplify the way you build gems and chef-cookbooks.
|
6
5
|
|
6
|
+
Bump is a gem that will simplify the way you build gems and chef-cookbooks.
|
7
7
|
|
8
8
|
# Installation
|
9
9
|
|
@@ -15,32 +15,42 @@ Current version:
|
|
15
15
|
|
16
16
|
bump current
|
17
17
|
|
18
|
-
Current version: 0.1.2
|
18
|
+
> Current version: 0.1.2
|
19
|
+
|
20
|
+
Version file path:
|
21
|
+
|
22
|
+
bump file
|
23
|
+
|
24
|
+
> Version file path: lib/foo/version.rb
|
19
25
|
|
20
26
|
Bump (major, minor, patch, pre):
|
21
27
|
|
22
28
|
bump patch
|
23
29
|
|
24
|
-
Bump version 0.1.2 to 0.1.3
|
30
|
+
> Bump version 0.1.2 to 0.1.3
|
31
|
+
|
32
|
+
## Options
|
25
33
|
|
26
|
-
###
|
34
|
+
### `--no-commit`
|
27
35
|
|
28
|
-
### --no-commit
|
29
36
|
If you don't want to make a commit after bumping, add the `--no-commit` option.
|
30
|
-
|
37
|
+
|
31
38
|
bump patch --no-commit
|
32
39
|
|
33
|
-
###
|
40
|
+
### `--tag`
|
41
|
+
|
34
42
|
Will add a git tag (if the current project is a git repository and `--no-commit` has not been given).
|
35
43
|
|
36
44
|
bump patch --tag
|
37
45
|
|
38
|
-
###
|
46
|
+
### `--no-bundle`
|
47
|
+
|
39
48
|
If you don't want to run the `bundle` command after bumping, add the `--no-bundle` option.
|
40
|
-
|
49
|
+
|
41
50
|
bump patch --no-bundle
|
42
51
|
|
43
|
-
###
|
52
|
+
### `--commit-message [MSG], -m [MSG]`
|
53
|
+
|
44
54
|
If you want to append additional information to the commit message, pass it in using the `--commit-message [MSG]` or `-m [MSG]` option.
|
45
55
|
|
46
56
|
bump patch --commit-message [no-ci]
|
@@ -51,7 +61,7 @@ or
|
|
51
61
|
|
52
62
|
### Rake
|
53
63
|
|
54
|
-
```
|
64
|
+
```ruby
|
55
65
|
# Rakefile
|
56
66
|
require "bump/tasks"
|
57
67
|
|
@@ -61,8 +71,9 @@ require "bump/tasks"
|
|
61
71
|
#
|
62
72
|
|
63
73
|
```
|
64
|
-
|
74
|
+
|
65
75
|
rake bump:current # display current version
|
76
|
+
rake bump:file # display version file path
|
66
77
|
|
67
78
|
# bumping using defaults for `COMMIT`, `TAG`, and `BUNDLE`
|
68
79
|
rake bump:major
|
@@ -76,21 +87,25 @@ require "bump/tasks"
|
|
76
87
|
rake bump:minor BUNDLE=false # don't run `bundle`
|
77
88
|
|
78
89
|
### Ruby
|
79
|
-
|
90
|
+
|
91
|
+
```ruby
|
80
92
|
require "bump"
|
81
93
|
Bump::Bump.current # -> "1.2.3"
|
94
|
+
Bump::Bump.file # -> "lib/foo/version.rb"
|
82
95
|
Bump::Bump.run("patch") # -> version changed
|
83
96
|
Bump::Bump.run("patch", commit: false, bundle:false, tag:false) # -> version changed with options
|
84
97
|
Bump::Bump.run("patch", commit_message: '[no ci]') # -> creates a commit message with 'v1.2.3 [no ci]' instead of default: 'v1.2.3'
|
85
98
|
```
|
86
99
|
|
87
100
|
# Supported locations
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
101
|
+
|
102
|
+
- `VERSION` file with `1.2.3`
|
103
|
+
- `gemspec` with `gem.version = "1.2.3"` or `Gem:Specification.new "gem-name", "1.2.3" do`
|
104
|
+
- `lib/**/version.rb` file with `VERSION = "1.2.3"`
|
105
|
+
- `metadata.rb` with `version "1.2.3"`
|
106
|
+
- `VERSION = "1.2.3"` in `lib/**/*.rb`
|
93
107
|
|
94
108
|
# Author
|
95
|
-
|
96
|
-
|
109
|
+
|
110
|
+
Gregory<br>
|
111
|
+
License: MIT
|
data/bin/bump
CHANGED
@@ -8,6 +8,7 @@ Bump your gem version.
|
|
8
8
|
|
9
9
|
Usage:
|
10
10
|
bump current # show current version
|
11
|
+
bump file # show version file path
|
11
12
|
bump pre # increase prerelease version of your gem (1.0.0-X) [alpha, beta, rc, ]
|
12
13
|
bump patch # increase patch version of your gem (1.0.X)
|
13
14
|
bump minor # increase minor version of your gem (1.X.0)
|
data/lib/bump.rb
CHANGED
@@ -13,7 +13,7 @@ module Bump
|
|
13
13
|
class Bump
|
14
14
|
BUMPS = %w(major minor patch pre)
|
15
15
|
PRERELEASE = ["alpha","beta","rc",nil]
|
16
|
-
OPTIONS = BUMPS | ["set", "current"]
|
16
|
+
OPTIONS = BUMPS | ["set", "current", "file"]
|
17
17
|
VERSION_REGEX = /(\d+\.\d+\.\d+(?:-(?:#{PRERELEASE.compact.join('|')}))?)/
|
18
18
|
|
19
19
|
class << self
|
@@ -37,6 +37,8 @@ module Bump
|
|
37
37
|
bump_set(options[:version], options)
|
38
38
|
when "current"
|
39
39
|
["Current version: #{current}", 0]
|
40
|
+
when "file"
|
41
|
+
["Version file path: #{file}", 0]
|
40
42
|
else
|
41
43
|
raise InvalidOptionError
|
42
44
|
end
|
@@ -56,6 +58,10 @@ module Bump
|
|
56
58
|
current_info.first
|
57
59
|
end
|
58
60
|
|
61
|
+
def file
|
62
|
+
current_info.last
|
63
|
+
end
|
64
|
+
|
59
65
|
def parse_cli_options!(options)
|
60
66
|
options.each do |key, value|
|
61
67
|
options[key] = parse_cli_options_value(value)
|
data/lib/bump/tasks.rb
CHANGED
@@ -7,9 +7,11 @@ namespace :bump do
|
|
7
7
|
abort unless status == 0
|
8
8
|
end
|
9
9
|
|
10
|
-
(Bump::Bump::BUMPS + ["current"]).each do |bump|
|
10
|
+
(Bump::Bump::BUMPS + ["current", "file"]).each do |bump|
|
11
11
|
if bump == "current"
|
12
12
|
desc "Show current gem version"
|
13
|
+
elsif bump == "file"
|
14
|
+
desc "Show version file path"
|
13
15
|
else
|
14
16
|
desc "Bump #{bump} part of gem version"
|
15
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory Marcilhacy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|