versioneer 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.versioneer.yml +1 -1
- data/README.md +17 -12
- data/Rakefile +4 -5
- data/bin/versioneer +2 -3
- data/lib/versioneer/config.rb +2 -2
- data/lib/versioneer/git.rb +2 -2
- 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: ee701908cb03f1d4b141322c9b585cc7437cad97
|
4
|
+
data.tar.gz: 5e0dd2d56aa57ac5117547d082f007b7ada3c8c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6efc9941ce943f798bdf8e9f86d59120b6f68146c6d4b2b503afe863158300cb88f2e48a4769d3d179778886c655408db991af487e29d6e0f763bec15deebdb7
|
7
|
+
data.tar.gz: fdc891bfbc2218b5ab83a31af1a27bc5883da759f424b151b081009b233ab2e2319598d7105adaadb2bce18978110dbcdbd6ceb5fa8f0b6ce3da9fba5285baed
|
data/.versioneer.yml
CHANGED
data/README.md
CHANGED
@@ -27,7 +27,9 @@ Project versions update automatically based on VCS changes and where the code ha
|
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
30
|
-
*
|
30
|
+
* Available from [Command-Line](#command-line) or [Ruby](#ruby-project-rails-rack-rubygem-etc)
|
31
|
+
* Project-level configuration using a `.versioneer.yml` file
|
32
|
+
* [Wiki Documentation](https://github.com/binarybabel/gem-versioneer/wiki)
|
31
33
|
* The Versioneer environment is selected from the following system variables:
|
32
34
|
* _Any value other than "production" is assumed to be "development"_
|
33
35
|
|
@@ -37,23 +39,23 @@ ENV['VERSIONEER_ENV'] || ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
|
|
37
39
|
|
38
40
|
### Command-Line
|
39
41
|
|
40
|
-
CLI usage defaults to "production" mode.
|
41
|
-
|
42
42
|
```
|
43
|
-
$ git tag -am 'Release
|
44
|
-
|
45
|
-
$ versioneer
|
43
|
+
$ git tag -am 'Release' v0.1
|
44
|
+
$ versioneer print
|
46
45
|
0.1
|
47
46
|
...
|
48
47
|
$ git commit --allow-empty -m 'Some changes.'
|
49
|
-
|
50
|
-
|
51
|
-
0.2.rc1
|
48
|
+
$ versioneer status
|
49
|
+
DEVELOPMENT -> 0.2.beta1
|
50
|
+
PRODUCTION -> 0.2.rc1
|
52
51
|
...
|
53
52
|
$ versioneer --help
|
54
53
|
```
|
55
54
|
|
56
|
-
### Ruby Project (Rails, Rack, etc.)
|
55
|
+
### Ruby Project (Rails, Rack, RubyGem, etc.)
|
56
|
+
|
57
|
+
Generic installation, adapt as necessary. See the
|
58
|
+
[Versioneer Wiki](https://github.com/binarybabel/gem-versioneer/wiki) for more.
|
57
59
|
|
58
60
|
* Add Versioneer to your Gemfile
|
59
61
|
|
@@ -75,15 +77,18 @@ Generating config
|
|
75
77
|
* Modify your project's version variable
|
76
78
|
|
77
79
|
```
|
80
|
+
$ vim config/version.rb
|
81
|
+
|
78
82
|
require 'versioneer'
|
79
83
|
module MyApp
|
80
|
-
|
84
|
+
# Configure versioneer with the project's root path:
|
85
|
+
VERSION = Versioneer::Config.new(File.expand_path('../../', __FILE__)).to_s
|
81
86
|
end
|
82
87
|
```
|
83
88
|
|
84
89
|
## Settings & Customization
|
85
90
|
|
86
|
-
**[
|
91
|
+
**[Please refer to the Versioneer Wiki for full documentation.](https://github.com/binarybabel/gem-versioneer/wiki)**
|
87
92
|
|
88
93
|
## Contributing
|
89
94
|
|
data/Rakefile
CHANGED
@@ -12,12 +12,11 @@ task :default => :test
|
|
12
12
|
load 'changelog.rake'
|
13
13
|
|
14
14
|
task :relock do
|
15
|
+
ENV['VERSIONEER_ENV'] = 'development'
|
15
16
|
system './bin/versioneer unlock > /dev/null'
|
16
17
|
system './bin/versioneer lock'
|
17
|
-
puts '...'
|
18
|
-
puts "Preparing to build Gem version #{`./bin/versioneer print`}..."
|
19
|
-
puts 'Press Ctrl-C now to cancel'
|
20
|
-
system 'sleep 5'
|
21
18
|
end
|
22
19
|
|
23
|
-
Rake::Task[:build].enhance [:relock]
|
20
|
+
Rake::Task[:build].enhance [:relock] do
|
21
|
+
system './bin/versioneer unlock > /dev/null'
|
22
|
+
end
|
data/bin/versioneer
CHANGED
@@ -83,12 +83,11 @@ case (cmd = ARGV.shift)
|
|
83
83
|
when 'lock'
|
84
84
|
v.lock!(ARGV.shift)
|
85
85
|
puts "+ #{Versioneer::Config::DEFAULT_LOCK}"
|
86
|
-
puts "
|
87
|
-
puts 'Will output this version without querying VCS.'
|
86
|
+
puts "Version: #{v}"
|
88
87
|
when 'unlock'
|
89
88
|
v.unlock!
|
90
89
|
puts "- #{Versioneer::Config::DEFAULT_LOCK}"
|
91
|
-
puts "
|
90
|
+
puts "#{v.environment.capitalize} version now: #{v}"
|
92
91
|
when 'init'
|
93
92
|
init_file = Versioneer::Config::DEFAULT_FILE
|
94
93
|
if File.exist?(init_file)
|
data/lib/versioneer/config.rb
CHANGED
@@ -16,13 +16,13 @@ module Versioneer
|
|
16
16
|
@config_base = base_dir_or_config_file
|
17
17
|
@config_file = File.join(base_dir_or_config_file, DEFAULT_FILE)
|
18
18
|
unless File.exist?(@config_file)
|
19
|
-
raise MissingConfigError, "
|
19
|
+
raise MissingConfigError, "Versioneer config file does not exist. (#{@config_file})"
|
20
20
|
end
|
21
21
|
elsif File.exist?(base_dir_or_config_file)
|
22
22
|
@config_file = base_dir_or_config_file
|
23
23
|
@config_base = File.dirname(@config_file)
|
24
24
|
else
|
25
|
-
raise RuntimeError, "
|
25
|
+
raise RuntimeError, "Versioneer base path does not exist. (#{base_dir_or_config_file})"
|
26
26
|
end
|
27
27
|
|
28
28
|
params = YAML.load_file(@config_file)
|
data/lib/versioneer/git.rb
CHANGED
@@ -6,9 +6,9 @@ module Versioneer
|
|
6
6
|
|
7
7
|
def initialize(file_within_repo, options=nil)
|
8
8
|
super
|
9
|
-
unless
|
9
|
+
unless Dir.exist?(File.join(file_within_repo, '.git'))
|
10
10
|
unless H.lines? `git ls-files #{file_within_repo} --error-unmatch #{H.cl_no_stderr}`
|
11
|
-
raise InvalidRepoError,
|
11
|
+
raise InvalidRepoError, "Not inside a Git repo. (#{file_within_repo})"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: versioneer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BinaryBabel OSS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|