releaser 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +46 -0
- data/lib/releaser/capistrano.rb +1 -1
- data/lib/releaser/capistrano/release_tagging.rb +2 -2
- data/lib/releaser/cli.rb +3 -2
- data/lib/releaser/version.rb +1 -1
- data/spec/lib/releaser/revision_spec.rb +1 -2
- metadata +17 -17
data/README.md
CHANGED
@@ -1,4 +1,50 @@
|
|
1
1
|
# Releaser #
|
2
2
|
|
3
|
+
[![Build Status](http://travis-ci.org/dmitriy-kiriyenko/releaser.png)](http://travis-ci.org/dmitriy-kiriyenko/releaser)
|
4
|
+
|
3
5
|
Very often we need to monitor versions of application. This gem helps to
|
4
6
|
do it.
|
7
|
+
|
8
|
+
## Installation ##
|
9
|
+
|
10
|
+
Add
|
11
|
+
|
12
|
+
```ruby gem 'releaser' ```
|
13
|
+
|
14
|
+
to your `Gemfile`.
|
15
|
+
|
16
|
+
## Autoreleasing ##
|
17
|
+
|
18
|
+
When issuing major release, run `releaser major NEW_CODENAME`. You may
|
19
|
+
omit the codename if you are not using any. This will tag a commit and
|
20
|
+
push the tag to origin. You have `--no-push` option not to do the last
|
21
|
+
step. Running it with `-p` will issue it in "pretend" mode, without
|
22
|
+
actual making changes.
|
23
|
+
|
24
|
+
To issue a minor release, you should run `releaser minor`. It has the
|
25
|
+
same options as `major`, except the codename.
|
26
|
+
|
27
|
+
To get the current version just type `release`. Try `-v` for more
|
28
|
+
verbosity.
|
29
|
+
|
30
|
+
## Capistrano ##
|
31
|
+
|
32
|
+
Add
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require 'releaser/capistrano'
|
36
|
+
```
|
37
|
+
|
38
|
+
to your `config/deploy.rb` file. This will automagically tag your deploy
|
39
|
+
commits and push it. Also it will write current revision to the file
|
40
|
+
`CURRENT_VERSION` in your application directory. To get it from
|
41
|
+
application, issue
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
Releaser::FromFile.new.version("no version")
|
45
|
+
```
|
46
|
+
|
47
|
+
with an optional argument for a default string (default is
|
48
|
+
"development").
|
49
|
+
|
50
|
+
See `lib/releaser/capistrano/release_tagging` for more details.
|
data/lib/releaser/capistrano.rb
CHANGED
@@ -2,7 +2,7 @@ unless Capistrano::Configuration.respond_to?(:instance)
|
|
2
2
|
abort "Soprano requires Capistrano 2"
|
3
3
|
end
|
4
4
|
|
5
|
-
Capistrano::Configuration.instance.load do
|
5
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
6
6
|
Dir["#{File.dirname(__FILE__)}/capistrano/*.rb"].each do |recipe|
|
7
7
|
load(recipe)
|
8
8
|
end
|
@@ -6,7 +6,7 @@ namespace :releaser do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
task :tag_deploy_commit do
|
9
|
-
run_locally "bundle exec releaser deploy --push"
|
9
|
+
run_locally "bundle exec releaser deploy --push --object=#{branch}"
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -16,7 +16,7 @@ on :load do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
if fetch(:write_version, true)
|
19
|
-
after "deploy:
|
19
|
+
after "deploy:create_symlink", "releaser:write_current"
|
20
20
|
end
|
21
21
|
|
22
22
|
if fetch(:tag_deploy_commit, true)
|
data/lib/releaser/cli.rb
CHANGED
@@ -11,7 +11,8 @@ module Releaser
|
|
11
11
|
include Rails::Generators::Actions
|
12
12
|
add_runtime_options!
|
13
13
|
class_option :message, :type => :string, :aliases => "-m", :desc => "Specify a tag message (-m option for git tag)"
|
14
|
-
class_option :
|
14
|
+
class_option :object, :type => :string, :aliases => "-o", :desc => "Specify a tag object (which commit to tag with version)"
|
15
|
+
class_option :push, :type => :boolean, :default => true, :desc => "Whether to push the commit (provide --no-push to override)"
|
15
16
|
default_task :info
|
16
17
|
|
17
18
|
desc "major [CODENAME]", "Issue a major release"
|
@@ -66,7 +67,7 @@ module Releaser
|
|
66
67
|
opts.push "-f" if config[:force]
|
67
68
|
end
|
68
69
|
|
69
|
-
run "git tag #{tag_options.join(" ")} -- #{tag}"
|
70
|
+
run "git tag #{tag_options.join(" ")} -- #{tag} #{options.object}"
|
70
71
|
run "git push origin #{tag}" if options.push?
|
71
72
|
end
|
72
73
|
|
data/lib/releaser/version.rb
CHANGED
@@ -104,7 +104,6 @@ describe Releaser::Revision do
|
|
104
104
|
end
|
105
105
|
|
106
106
|
it "should correctly return next major version without codename" do
|
107
|
-
subject.next_major.to_s.should == "v7.0"
|
108
107
|
verify_revision(subject.next_major, {
|
109
108
|
:major => 7,
|
110
109
|
:minor => 0,
|
@@ -113,7 +112,7 @@ describe Releaser::Revision do
|
|
113
112
|
})
|
114
113
|
end
|
115
114
|
|
116
|
-
it "should correctly return next
|
115
|
+
it "should correctly return next minor version without codename" do
|
117
116
|
verify_revision(subject.next_minor, {
|
118
117
|
:major => 6,
|
119
118
|
:minor => 2,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: releaser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2201032700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2201032700
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &2201032280 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2201032280
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: thor
|
38
|
-
requirement: &
|
38
|
+
requirement: &2201031860 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2201031860
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activesupport
|
49
|
-
requirement: &
|
49
|
+
requirement: &2201031440 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2201031440
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: railties
|
60
|
-
requirement: &
|
60
|
+
requirement: &2201031020 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2201031020
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capistrano
|
71
|
-
requirement: &
|
71
|
+
requirement: &2201030600 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2201030600
|
80
80
|
description: ! "A set of thor scripts for managing application versions.\n Use
|
81
81
|
it to control and even display your application current version."
|
82
82
|
email:
|
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
segments:
|
121
121
|
- 0
|
122
|
-
hash:
|
122
|
+
hash: 3449601271400151642
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
none: false
|
125
125
|
requirements:
|
@@ -128,10 +128,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
segments:
|
130
130
|
- 0
|
131
|
-
hash:
|
131
|
+
hash: 3449601271400151642
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project: releaser
|
134
|
-
rubygems_version: 1.8.
|
134
|
+
rubygems_version: 1.8.11
|
135
135
|
signing_key:
|
136
136
|
specification_version: 3
|
137
137
|
summary: A set of thor scripts for managing application versions
|