capistrano-github-releases 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/capistrano/github/releases/version.rb +1 -1
- data/lib/capistrano/tasks/github_releases.rake +10 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71aca8f27ca598ca51566e70d227c5972a3368e7
|
4
|
+
data.tar.gz: 1aeb6d7004041310bc076988d824978c50484c4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69f2bd02e62197d9f03f418a4908aa65b0825e7648352f31d29327a35d6051fb54f87f49b2eb4d00fdc59579e31a96f0fe4f6693785bf71440444b21ed1ce264
|
7
|
+
data.tar.gz: 15df6b18706e4f3061549e5b8cf23794c6b8192ab470e7fbf3f4526da5bdcd5c3761844f7a4a6e582f6176cab135d4ac7ddd042fb1b8a3e440dae7b6bad2c9d1
|
data/README.md
CHANGED
@@ -55,7 +55,9 @@ Set capistrano variables with `set name, value`.
|
|
55
55
|
Name | Default | Description
|
56
56
|
---- | ------- | -----------
|
57
57
|
ask_release | false | When true, asks for the release title and text
|
58
|
-
release_tag | `
|
58
|
+
release_tag | `fetch(:released_at).strftime('%Y%m%d-%H%M%S%z')` | Create releases when git-tag name
|
59
|
+
release_title | use pull-request title | Title of release note
|
60
|
+
release_body | release time and pull-request id | Body of release note
|
59
61
|
release_comment | This change was deployed to production :octocat: ... | Pull requests to deploy report comment
|
60
62
|
|
61
63
|
### GitHub Enterprise
|
@@ -17,7 +17,8 @@ end
|
|
17
17
|
namespace :github do
|
18
18
|
namespace :releases do
|
19
19
|
set :ask_release, false
|
20
|
-
set :
|
20
|
+
set :released_at, -> { Time.now }
|
21
|
+
set :release_tag, -> { fetch(:released_at).strftime('%Y%m%d-%H%M%S%z') }
|
21
22
|
|
22
23
|
set :username, -> {
|
23
24
|
username = `git config --get user.name`.strip
|
@@ -48,13 +49,16 @@ namespace :github do
|
|
48
49
|
}
|
49
50
|
|
50
51
|
set :release_body, -> {
|
51
|
-
|
52
|
+
default_body = <<-MD.gsub(/^ {6}/, '').strip
|
53
|
+
released at #{fetch(:released_at).strftime('%Y-%m-%d %H:%M:%S %z')}
|
54
|
+
pull request: #{fetch(:github_repo)}##{fetch(:pull_request_id)}
|
55
|
+
MD
|
52
56
|
|
53
57
|
if fetch(:ask_release)
|
54
|
-
body = HighLine.new.ask("Release
|
55
|
-
"#{body + "\n" unless body.empty?}#{
|
58
|
+
body = HighLine.new.ask("Release Body?")
|
59
|
+
"#{body + "\n" unless body.empty?}#{default_body}"
|
56
60
|
else
|
57
|
-
|
61
|
+
default_body
|
58
62
|
end
|
59
63
|
}
|
60
64
|
|
@@ -128,7 +132,7 @@ namespace :github do
|
|
128
132
|
draft: false,
|
129
133
|
prerelease: false
|
130
134
|
)
|
131
|
-
info "Release
|
135
|
+
info "Release as #{fetch(:release_tag)} to #{fetch(:github_repo)} was created"
|
132
136
|
rescue => e
|
133
137
|
error e.message
|
134
138
|
invoke 'github:git:create_tag_and_push_origin'
|