cookbook-release 1.6.0 → 1.7.0
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/.github/workflows/ci.yml +15 -0
- data/.github/workflows/release.yml +18 -0
- data/Rakefile +6 -0
- data/cookbook-release.gemspec +1 -1
- data/lib/cookbook-release/git-utilities.rb +1 -0
- data/lib/cookbook-release/release.rb +1 -1
- data/lib/cookbook-release/supermarket.rb +4 -4
- data/spec/release_spec.rb +2 -1
- metadata +6 -6
- data/.travis.yml +0 -12
- data/Rakefile.rb +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59ea3c1e5d1d222c334a409f63333f4a7339cebc36655043656fd1c26c78ec2f
|
|
4
|
+
data.tar.gz: 59d2e2dfb5db2d3bd9e28fc341b0839c0fdb63a0d8483764528cb2bede290320
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b292dadbf789958681065228a9732c0614008e9cca74a8e3bcf478cbbf42da2c0bef73f8a6ad2ae52309b0ac47573a6038ddd62480fb4c73afdab76616be4f1
|
|
7
|
+
data.tar.gz: 5f856842d4d1588c21d3961d29f9346b8b41000e3054933dcfbdba830a3811703b5894b6ac41cdd530e9bb6d2e6a8911eb65874cfd423dfc0b98c2dc82f2f58f
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
strategy:
|
|
7
|
+
matrix:
|
|
8
|
+
ruby-version: ['2.5', '2.7']
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v2
|
|
11
|
+
- uses: ruby/setup-ruby@v1
|
|
12
|
+
with:
|
|
13
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
14
|
+
bundler-cache: true
|
|
15
|
+
- run: bundle exec rake
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: [ '*' ]
|
|
5
|
+
jobs:
|
|
6
|
+
release:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v2
|
|
10
|
+
- uses: ruby/setup-ruby@v1
|
|
11
|
+
with:
|
|
12
|
+
ruby-version: 2.7
|
|
13
|
+
- run: |
|
|
14
|
+
install -D -m 600 <(echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}") $HOME/.gem/credentials
|
|
15
|
+
gem build *.gemspec
|
|
16
|
+
gem push *.gem
|
|
17
|
+
env:
|
|
18
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
data/Rakefile
ADDED
data/cookbook-release.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ require 'English'
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'cookbook-release'
|
|
9
|
-
spec.version = '1.
|
|
9
|
+
spec.version = '1.7.0'
|
|
10
10
|
spec.authors = ['Grégoire Seux']
|
|
11
11
|
spec.email = 'g.seux@criteo.com'
|
|
12
12
|
spec.summary = 'Provide primitives (and rake tasks) to release a cookbook'
|
|
@@ -108,7 +108,7 @@ module CookbookRelease
|
|
|
108
108
|
exit 1 unless agreed
|
|
109
109
|
git.push_tag(new_version)
|
|
110
110
|
supermarket = Supermarket.new
|
|
111
|
-
supermarket.publish_ck(@category)
|
|
111
|
+
supermarket.publish_ck(@category, git.sub_dir)
|
|
112
112
|
rescue
|
|
113
113
|
puts HighLine.color("Release aborted, you have to reset to previous state manually", :red)
|
|
114
114
|
puts ":use with care: #{git.reset_command(new_version)}"
|
|
@@ -8,7 +8,7 @@ require 'json'
|
|
|
8
8
|
module CookbookRelease
|
|
9
9
|
class Supermarket
|
|
10
10
|
|
|
11
|
-
# This code is adapted from "knife cookbook share" and travis dpl provider
|
|
11
|
+
# This code is adapted from "knife cookbook share" and travis dpl provider
|
|
12
12
|
# for supermarket.
|
|
13
13
|
|
|
14
14
|
def initialize(opts={})
|
|
@@ -20,11 +20,11 @@ module CookbookRelease
|
|
|
20
20
|
|
|
21
21
|
include ::Chef::Mixin::ShellOut
|
|
22
22
|
|
|
23
|
-
def publish_ck(category)
|
|
24
|
-
ck = ::Chef::Cookbook::CookbookVersionLoader.new('.')
|
|
23
|
+
def publish_ck(category, path = nil)
|
|
24
|
+
ck = ::Chef::Cookbook::CookbookVersionLoader.new(path || '.')
|
|
25
25
|
ck.load!
|
|
26
26
|
cookbook = ck.cookbook_version
|
|
27
|
-
# we have to provide a rest option otherwise it will try to load a
|
|
27
|
+
# we have to provide a rest option otherwise it will try to load a
|
|
28
28
|
# client.pem key
|
|
29
29
|
::Chef::CookbookUploader.new(cookbook, rest: 'fake_rest').validate_cookbooks
|
|
30
30
|
|
data/spec/release_spec.rb
CHANGED
|
@@ -36,12 +36,13 @@ describe Release do
|
|
|
36
36
|
:push_tag => true,
|
|
37
37
|
)
|
|
38
38
|
allow(git).to receive(:no_prompt=)
|
|
39
|
+
allow(git).to receive(:sub_dir).and_return(nil)
|
|
39
40
|
release = Release.new(git, no_prompt: true)
|
|
40
41
|
|
|
41
42
|
supermarket = double('supermarket')
|
|
42
43
|
expect(CookbookRelease::Supermarket).to receive(:new).and_return(supermarket)
|
|
43
44
|
|
|
44
|
-
expect(supermarket).to receive(:publish_ck).with('Other')
|
|
45
|
+
expect(supermarket).to receive(:publish_ck).with('Other', nil)
|
|
45
46
|
release.release!
|
|
46
47
|
end
|
|
47
48
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookbook-release
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grégoire Seux
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-07-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: semantic
|
|
@@ -162,12 +162,13 @@ executables: []
|
|
|
162
162
|
extensions: []
|
|
163
163
|
extra_rdoc_files: []
|
|
164
164
|
files:
|
|
165
|
+
- ".github/workflows/ci.yml"
|
|
166
|
+
- ".github/workflows/release.yml"
|
|
165
167
|
- ".gitignore"
|
|
166
|
-
- ".travis.yml"
|
|
167
168
|
- Gemfile
|
|
168
169
|
- LICENSE.txt
|
|
169
170
|
- README.md
|
|
170
|
-
- Rakefile
|
|
171
|
+
- Rakefile
|
|
171
172
|
- cookbook-release.gemspec
|
|
172
173
|
- lib/cookbook-release.rb
|
|
173
174
|
- lib/cookbook-release/changelog.rb
|
|
@@ -200,8 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
200
201
|
- !ruby/object:Gem::Version
|
|
201
202
|
version: '0'
|
|
202
203
|
requirements: []
|
|
203
|
-
|
|
204
|
-
rubygems_version: 2.7.6.2
|
|
204
|
+
rubygems_version: 3.1.6
|
|
205
205
|
signing_key:
|
|
206
206
|
specification_version: 4
|
|
207
207
|
summary: Provide primitives (and rake tasks) to release a cookbook
|
data/.travis.yml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
rvm:
|
|
3
|
-
- 2.4.0
|
|
4
|
-
deploy:
|
|
5
|
-
provider: rubygems
|
|
6
|
-
api_key:
|
|
7
|
-
secure: ylfB0GIaZxPfZ6/dSJIPujfSt3vxqVFg16lqTBq/2AAZ0qwKTZi9qeM/QZDLMX28vCXmTsYxHGepmyvv0PvJaKvy7E6YBzIKz1Y1vsEZFeAFrgIQq9cDvc4wIX2eFjI7N1ChyaRgi+YYK4BSVfKjYqGBfXk5Wyh7uqNEuWE7FzABV+RxXoHcNi+AhYkCX3NF80qNukXRtiB7XTQj6CP4Wd+Dm25iOUwx8/zNMce8Z8V3j2ysvR4Vtm/soDsr/+Z+27wIdP0VqwElV1FxtR9km8MIJhmzSsnzcvgqJpRmMvO6HLZFzwqnLBzCoPYJqm3K+uQSSfll5LbaNtixlBzIusgtGgm1UjQy1YDGkPexJd5K5CuC/LW78Y7Zrl3CeT34RDlICoztEjhJxFry3EvFxPT03lVQx5z5Fc55/u0hy3mBCiHbxHxAPJLMOtehfv35bzOS7Jv3+otBm/8jn9dXO2pJJdwxL9W2wrzljWkly4yemwceMvtMYf+xnf1zdTnMYoqkYGGl0KutbFL69w78w7BwTFQIhcJOO+g27C6V8vHtqU0U5JOgE/QNg3yWhzhQjgCpzQhmuO+Bcs3Jq2T/OcqTfwM6gufNe+Gq2TdEfeH5Y0WcRtTKJBVVQ4XWFtgONE1C1hNBFLyh7GNZDQQVYBT3c/MXeV5Q++rVJYOdSrw=
|
|
8
|
-
gem: cookbook-release
|
|
9
|
-
on:
|
|
10
|
-
tags: true
|
|
11
|
-
repo: criteo/cookbook-release
|
|
12
|
-
skip_cleanup: 'true'
|