bake-bundler 0.3.0 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bake/bundler.rb +1 -1
- data/bake/bundler/release.rb +43 -9
- data/lib/bake/bundler/version.rb +1 -1
- metadata +25 -15
- data/.gitignore +0 -12
- data/.rspec +0 -3
- data/Gemfile +0 -7
- data/README.md +0 -65
- data/bake-bundler.gemspec +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5c8080ada46b84614702d417ff2459410232056d0b3092c70eb5e0572cf233a
|
4
|
+
data.tar.gz: 49923cc2bde751559f8fdf3f51c661ba08be988717af25b761dd36a87ad3f24c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 805fee3264808fe7a76f6fb5811be7ecc80056395da5808a89e574a3ab33b15e56e741846a1065d6480d134575c948691d1c420f1b541a953dcba0030e20bd0b
|
7
|
+
data.tar.gz: 6a3f97c3a556763c316c6d0cc7bc10908b7e7a11117a0c24d444a42e8c1166b66a7e948c259a8d2300f073a51b1eaf74453274b9a8d6d33bd6da811ddda1c8c1
|
data/bake/bundler.rb
CHANGED
data/bake/bundler/release.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
|
-
# Increment the patch number of the current version
|
2
|
+
# Increment the patch number of the current version.
|
3
3
|
def patch
|
4
4
|
release([nil, nil, 1], message: "Patch version bump.")
|
5
5
|
end
|
6
6
|
|
7
|
-
# Increment the
|
7
|
+
# Increment the minor number of the current version.
|
8
8
|
def minor
|
9
9
|
release([nil, 1, 0], message: "Minor version bump.")
|
10
10
|
end
|
11
11
|
|
12
|
-
# Increment the
|
12
|
+
# Increment the major number of the current version.
|
13
13
|
def major
|
14
14
|
release([1, 0, 0], message: "Major version bump.")
|
15
15
|
end
|
@@ -18,8 +18,8 @@ VERSION_PATTERN = /VERSION = ['"](?<value>\d+\.\d+\.\d+)(?<pre>.*?)['"]/
|
|
18
18
|
|
19
19
|
# Scans the files listed in the gemspec for a file named `version.rb`. Extracts the VERSION constant and updates it according to the version bump. Commits the changes to git using the specified message.
|
20
20
|
#
|
21
|
-
# @
|
22
|
-
# @
|
21
|
+
# @parameter bump [Array(Integer | Nil)] the version bump to apply before publishing, e.g. `0,1,0` to increment minor version number.
|
22
|
+
# @parameter message [String] the git commit message to use.
|
23
23
|
def increment(bump, message: "Bump version.")
|
24
24
|
release = context.lookup('bundler:release')
|
25
25
|
helper = release.instance.helper
|
@@ -70,9 +70,43 @@ def release(*arguments, **options)
|
|
70
70
|
release = context.lookup('bundler:release')
|
71
71
|
helper = release.instance.helper
|
72
72
|
|
73
|
-
|
73
|
+
changes = readlines("git", "status", "--porcelain")
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
if changes.any?
|
76
|
+
puts "Uncommitted modifications detected:"
|
77
|
+
changes.each do |change|
|
78
|
+
puts change
|
79
|
+
end
|
80
|
+
else
|
81
|
+
last_commit = readlines("git", "log", "-1", "--oneline").first
|
82
|
+
|
83
|
+
unless last_commit =~ /version bump|bump version/i
|
84
|
+
increment(*arguments, **options)
|
85
|
+
end
|
86
|
+
|
87
|
+
release.call
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def shell(*arguments)
|
92
|
+
IO.pipe do |input, output|
|
93
|
+
pid = Process.spawn(*arguments, out: output)
|
94
|
+
output.close
|
95
|
+
|
96
|
+
begin
|
97
|
+
yield input
|
98
|
+
ensure
|
99
|
+
pid, status = Process.wait2(pid)
|
100
|
+
|
101
|
+
unless status.success?
|
102
|
+
raise "Failed to execute #{arguments} -> #{status}"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def readlines(*arguments)
|
109
|
+
shell(*arguments) do |output|
|
110
|
+
return output.readlines
|
111
|
+
end
|
78
112
|
end
|
data/lib/bake/bundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bake
|
@@ -24,27 +24,37 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
|
-
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description:
|
28
42
|
email:
|
29
|
-
- samuel.williams@oriontransfer.co.nz
|
30
43
|
executables: []
|
31
44
|
extensions: []
|
32
45
|
extra_rdoc_files: []
|
33
46
|
files:
|
34
|
-
- ".gitignore"
|
35
|
-
- ".rspec"
|
36
|
-
- Gemfile
|
37
|
-
- README.md
|
38
|
-
- bake-bundler.gemspec
|
39
47
|
- bake/bundler.rb
|
40
48
|
- bake/bundler/release.rb
|
41
49
|
- lib/bake/bundler.rb
|
42
50
|
- lib/bake/bundler/helper.rb
|
43
51
|
- lib/bake/bundler/version.rb
|
44
52
|
homepage: https://github.com/ioquatix/bake-bundler
|
45
|
-
licenses:
|
46
|
-
|
47
|
-
|
53
|
+
licenses:
|
54
|
+
- MIT
|
55
|
+
metadata:
|
56
|
+
funding_uri: https://github.com/sponsors/ioquatix/
|
57
|
+
post_install_message:
|
48
58
|
rdoc_options: []
|
49
59
|
require_paths:
|
50
60
|
- lib
|
@@ -59,8 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
69
|
- !ruby/object:Gem::Version
|
60
70
|
version: '0'
|
61
71
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
63
|
-
signing_key:
|
72
|
+
rubygems_version: 3.2.15
|
73
|
+
signing_key:
|
64
74
|
specification_version: 4
|
65
75
|
summary: Provides recipes for bundler.
|
66
76
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
# Bake::Bundler
|
2
|
-
|
3
|
-
Provides bake tasks for releasing gems using bundler.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
```
|
8
|
-
bundle add bake-bundler
|
9
|
-
```
|
10
|
-
|
11
|
-
## Usage
|
12
|
-
|
13
|
-
### Build
|
14
|
-
|
15
|
-
```
|
16
|
-
bake bundler:build
|
17
|
-
```
|
18
|
-
|
19
|
-
### Install
|
20
|
-
|
21
|
-
```
|
22
|
-
bake bundler:install
|
23
|
-
```
|
24
|
-
|
25
|
-
### Release
|
26
|
-
|
27
|
-
```
|
28
|
-
bake bundler:release
|
29
|
-
```
|
30
|
-
|
31
|
-
## Contributing
|
32
|
-
|
33
|
-
1. Fork it
|
34
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
35
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
36
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
37
|
-
5. Create new Pull Request
|
38
|
-
|
39
|
-
## See Also
|
40
|
-
|
41
|
-
- [Bake](https://github.com/ioquatix/bake) — The bake task execution tool.
|
42
|
-
|
43
|
-
## License
|
44
|
-
|
45
|
-
Released under the MIT license.
|
46
|
-
|
47
|
-
Copyright, 2020, by [Samuel G. D. Williams](http://www.codeotaku.com).
|
48
|
-
|
49
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
50
|
-
of this software and associated documentation files (the "Software"), to deal
|
51
|
-
in the Software without restriction, including without limitation the rights
|
52
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
53
|
-
copies of the Software, and to permit persons to whom the Software is
|
54
|
-
furnished to do so, subject to the following conditions:
|
55
|
-
|
56
|
-
The above copyright notice and this permission notice shall be included in
|
57
|
-
all copies or substantial portions of the Software.
|
58
|
-
|
59
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
60
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
61
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
62
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
63
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
64
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
65
|
-
THE SOFTWARE.
|
data/bake-bundler.gemspec
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require_relative 'lib/bake/bundler/version'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = "bake-bundler"
|
5
|
-
spec.version = Bake::Bundler::VERSION
|
6
|
-
spec.authors = ["Samuel Williams"]
|
7
|
-
spec.email = ["samuel.williams@oriontransfer.co.nz"]
|
8
|
-
|
9
|
-
spec.summary = "Provides recipes for bundler."
|
10
|
-
spec.homepage = "https://github.com/ioquatix/bake-bundler"
|
11
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
12
|
-
|
13
|
-
# Specify which files should be added to the gem when it is released.
|
14
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
15
|
-
spec.files = Dir.chdir(__dir__) do
|
16
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
end
|
18
|
-
|
19
|
-
spec.add_dependency "bake", "~> 0.9"
|
20
|
-
|
21
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
-
spec.require_paths = ["lib"]
|
23
|
-
end
|