version_manager 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +66 -0
- data/lib/version_manager/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: 412b45322d6ec083296e7ca8f88293980454ab1d
|
4
|
+
data.tar.gz: cd0e2cbf80b65a2dcbd3fe4d1dd4625b19945b21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721584f55433b4dd7960558bd235970b7b1a5d4d85b1057e17b370b07a01bd932d40279c29f23381d3d62488358b915c7d29eac275ad5faaa8262d68c0590bdd
|
7
|
+
data.tar.gz: a10cd1af8c5a1aea4174f985b98b7b0146963945cbbb0bbf9f592d4623854d17765fa2f44fed339a8cf12db8385242ed46a1a255061ddb75086378620991ab4f
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Version Manager
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/tpbowden/version_manager.svg?branch=master)](https://travis-ci.org/tpbowden/version_manager) [![Code Climate](https://codeclimate.com/github/tpbowden/version_manager/badges/gpa.svg)](https://codeclimate.com/github/tpbowden/version_manager) [![Gem Version](https://badge.fury.io/rb/version_manager.svg)](https://badge.fury.io/rb/version_manager) [![Dependency Status](https://gemnasium.com/badges/github.com/tpbowden/version_manager.svg)](https://gemnasium.com/github.com/tpbowden/version_manager)
|
4
|
+
|
5
|
+
|
3
6
|
Automatically manage version updates and tagging. The new version will be written to your version file,
|
4
7
|
history file and as a tagged git commit.
|
5
8
|
|
@@ -66,3 +69,66 @@ The format git tags will be given after version has been updated. `%s` will be r
|
|
66
69
|
|
67
70
|
The logger to use when printing info messages. By default this just logs the messages with no formatting to STDOUT.
|
68
71
|
If you want to suppress logging you can just use `Logger.new "/dev/null"`
|
72
|
+
|
73
|
+
## Example
|
74
|
+
|
75
|
+
Here is an example of what happens when you release a new version.
|
76
|
+
|
77
|
+
Given a version file `lib/my_gem/version.rb` which looks like this:
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
|
81
|
+
module MyGem
|
82
|
+
VERSION = "1.2.3"
|
83
|
+
end
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
And a file `history.rdoc` which looks like this:
|
88
|
+
|
89
|
+
```
|
90
|
+
* Some important work
|
91
|
+
* Some bug fixes
|
92
|
+
```
|
93
|
+
|
94
|
+
And a rake task `tasks/release.rake` loaded by your Rakefile which looks like this:
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
require "version_manager/rake_task"
|
98
|
+
|
99
|
+
VersionManager::RakeTask.new do |config|
|
100
|
+
config.version_file = "lib/my_gem/version.rb"
|
101
|
+
config.version_constant = "MyGem::VERSION"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
You can create a new release by using one of the following command:
|
106
|
+
|
107
|
+
bundle exec rake release:major
|
108
|
+
bundle exec rake release:minor
|
109
|
+
bundle exec rake release:patch
|
110
|
+
|
111
|
+
When you do this 3 things will happen:
|
112
|
+
|
113
|
+
* The version file will be rewritten to contain the new version
|
114
|
+
```ruby
|
115
|
+
module MyGem
|
116
|
+
VERSION = "2.0.0"
|
117
|
+
end
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
* This history file will have a new line containing the new version and today's date
|
122
|
+
```
|
123
|
+
== v2.0.0 (19 January 2017)
|
124
|
+
|
125
|
+
* Some important work
|
126
|
+
* Some bug fixes
|
127
|
+
```
|
128
|
+
|
129
|
+
* The history and version files are both commited and tagged in git
|
130
|
+
|
131
|
+
The only things left to do then is push your new tag and commit then deploy the new release
|
132
|
+
|
133
|
+
|
134
|
+
|