github-rake-release 0.2.1.pre.alpha → 0.2.2.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -7
- data/lib/github/rake/release/config.rb +1 -1
- data/lib/github/rake/release/tasks.rb +10 -0
- data/lib/github/rake/release/version.rb +1 -1
- 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: 97af77449254fab72963cc435ea422ab4d34b7db
|
4
|
+
data.tar.gz: 1c423435edbd37567d7bb3f13a72f5efca61ab0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 434cf61da04c2f07a294cbe81407d75e88f2944eda2d3b541186a764ff732186feccfd2dba12a1d08252860f645a3294a3ba2b320325b55fbc061c5eb3db3c06
|
7
|
+
data.tar.gz: fd11ef1298cb95cc0c42d0926ce744837bc1e177be66d45aaa5c43962f5a51f1b2575efe372a01963bfc92ad47e6629d9cb8549a1eb8db7daa84841fb62f0039
|
data/README.md
CHANGED
@@ -7,7 +7,9 @@ Rake Tasks for Automating Github Releases
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
|
10
|
+
group :development do
|
11
|
+
gem 'github-rake-release'
|
12
|
+
end
|
11
13
|
```
|
12
14
|
|
13
15
|
And then execute:
|
@@ -23,7 +25,9 @@ Or install it yourself as:
|
|
23
25
|
#### 1. Rakefile:
|
24
26
|
|
25
27
|
```ruby
|
26
|
-
|
28
|
+
if Rails.env.development?
|
29
|
+
require 'github/rake/release'
|
30
|
+
end
|
27
31
|
```
|
28
32
|
|
29
33
|
And list all available tasks:
|
@@ -38,11 +42,12 @@ We can customise these values, tho:
|
|
38
42
|
|
39
43
|
```ruby
|
40
44
|
# Rakefile
|
41
|
-
|
42
|
-
require 'github/rake/release'
|
43
|
-
Github::Rake::Release.configure do |config|
|
44
|
-
|
45
|
-
|
45
|
+
if Rails.env.development?
|
46
|
+
require 'github/rake/release'
|
47
|
+
Github::Rake::Release.configure do |config|
|
48
|
+
config.respository = 'username/repository-name'
|
49
|
+
config.merge_from = :development
|
50
|
+
end
|
46
51
|
end
|
47
52
|
```
|
48
53
|
|
@@ -90,6 +95,12 @@ Running:
|
|
90
95
|
|
91
96
|
Shows the repository where the release will be created
|
92
97
|
|
98
|
+
Running:
|
99
|
+
|
100
|
+
$ bundle exec rake github:merge_from
|
101
|
+
|
102
|
+
Shows branch configured to be merged into master
|
103
|
+
|
93
104
|
## Development
|
94
105
|
|
95
106
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -5,7 +5,7 @@ module Github
|
|
5
5
|
attr_accessor :respository, :merge_from
|
6
6
|
|
7
7
|
def initialize
|
8
|
-
@respository = `git remote get-url origin
|
8
|
+
@respository = `git remote get-url origin`&.gsub!('https://github.com/', '')&.gsub!('.git', '')&.strip
|
9
9
|
@merge_from = :develop
|
10
10
|
end
|
11
11
|
end
|
@@ -10,6 +10,7 @@ module Github
|
|
10
10
|
define_github_merge_task
|
11
11
|
define_github_release_task
|
12
12
|
define_github_repository_task
|
13
|
+
define_github_branch_to_merge_task
|
13
14
|
end
|
14
15
|
|
15
16
|
private
|
@@ -77,6 +78,15 @@ module Github
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
end
|
81
|
+
|
82
|
+
def define_github_branch_to_merge_task
|
83
|
+
namespace :github do
|
84
|
+
desc 'Shows branch configured to be merged into master'
|
85
|
+
task :merge_from do
|
86
|
+
puts Github::Rake::Release.config.merge_from
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
80
90
|
end
|
81
91
|
end
|
82
92
|
end
|