berkflow 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +9 -1
- data/lib/berkflow/thor_tasks.rb +8 -5
- data/lib/berkflow/version.rb +1 -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: 6b1b505afce6594671b31210423985595030f95a
|
4
|
+
data.tar.gz: 8cf833b37c9e535322bf15bb3abd667b2bb9f8d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 560ff0d829b8993ac2dca5fd2cf76b51daa43c6d79be49e1b0972ff6c7c0fc55ac2e511f002bc6f85a6ec7127cb91b72dc3f237f7e4fb570377d146989513b44
|
7
|
+
data.tar.gz: f04ca1cbb12d9ebc8d27d80eeff6be2b32db69be1f13149a28276c01ab274f7c3ca4645554741a23439c637752f0ae487cef49bbba28f1fd6e37e1488b7c94f1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,15 @@ A command line tool for managing Chef Environments using Berkshelf and the [Envi
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
|
9
|
+
Install the [Chef-DK](http://getchef.com/downloads/chef-dk) and add the Chef-DK gem binaries directory to your path
|
10
|
+
|
11
|
+
$ export PATH=/opt/chefdk/embedded/bin:$PATH
|
12
|
+
|
13
|
+
Install Berkflow as a Chef-DK gem
|
14
|
+
|
15
|
+
$ sudo chef gem install berkflow
|
16
|
+
$ which blo
|
17
|
+
/opt/chefdk/embedded/bin/blo
|
10
18
|
|
11
19
|
## Usage
|
12
20
|
|
data/lib/berkflow/thor_tasks.rb
CHANGED
@@ -23,11 +23,12 @@ module Berkflow
|
|
23
23
|
desc "release", "Create a Github Release for the current cookbook version."
|
24
24
|
def release
|
25
25
|
cookbook = Ridley::Chef::Cookbook.from_path(File.dirname(options[:berksfile]))
|
26
|
-
version = "v#{cookbook.version}"
|
27
26
|
begin
|
28
|
-
release
|
27
|
+
say "Creating GitHub release (#{cookbook.version})"
|
28
|
+
release = github_client.create_release(repository, cookbook.version)
|
29
29
|
rescue Octokit::UnprocessableEntity
|
30
|
-
|
30
|
+
say "Release already exists, skipping..."
|
31
|
+
release = github_client.releases(repository).find { |release| release[:tag_name] == cookbook.version }
|
31
32
|
end
|
32
33
|
|
33
34
|
berksfile = Berkshelf::Berksfile.from_file(options[:berksfile])
|
@@ -36,8 +37,10 @@ module Berkflow
|
|
36
37
|
FileUtils.mkdir_p(pkg_dir)
|
37
38
|
berksfile.package(out_file)
|
38
39
|
|
39
|
-
|
40
|
-
|
40
|
+
begin
|
41
|
+
say "Uploading #{File.basename(out_file)} to GitHub..."
|
42
|
+
github_client.upload_asset(release[:url], out_file, name: "cookbooks.tar.gz", content_type: "application/x-tar")
|
43
|
+
rescue Errno::EPIPE; end
|
41
44
|
end
|
42
45
|
|
43
46
|
private
|
data/lib/berkflow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semverse
|