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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3672df4599ece68c07bd90b81ee88ffbfaad7e5
4
- data.tar.gz: c2e742df40e00c93dc2fda05e60cb99eb85d77ff
3
+ metadata.gz: ee701908cb03f1d4b141322c9b585cc7437cad97
4
+ data.tar.gz: 5e0dd2d56aa57ac5117547d082f007b7ada3c8c6
5
5
  SHA512:
6
- metadata.gz: ce76334fbc57eb035b24faaece27228acbc5dfa408737645a1737921eb6d2391818c44f9e45e2c388f54b28c67b08dfb8537392a7acba2fa5e06b125fb62704d
7
- data.tar.gz: 9abfe251e0fd6d9b5f2b9a3e1ad1e0cda86b0e324af2a388ee7ef618c5583e821a91f609e70eccad66f5e9e8d725efa06ea3f707dd80b29ada133d4a85fc035e
6
+ metadata.gz: 6efc9941ce943f798bdf8e9f86d59120b6f68146c6d4b2b503afe863158300cb88f2e48a4769d3d179778886c655408db991af487e29d6e0f763bec15deebdb7
7
+ data.tar.gz: fdc891bfbc2218b5ab83a31af1a27bc5883da759f424b151b081009b233ab2e2319598d7105adaadb2bce18978110dbcdbd6ceb5fa8f0b6ce3da9fba5285baed
data/.versioneer.yml CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  type: Git
5
5
  bump_segment: minor
6
+ environment: development
6
7
  prereleases:
7
8
  - alpha
8
9
  - beta
9
- - beta
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
- * [Configuration options are documented in the Wiki.](https://github.com/binarybabel/gem-versioneer/wiki)
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 0.1' v0.1
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
- $ versioneer
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
- VERSION = Versioneer::Config.new(Rails.root).version.to_s
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
- **[Check out the Versioneer Wiki for more information](https://github.com/binarybabel/gem-versioneer/wiki)**
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 "Locked at version: #{v}"
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 "Unlocked. #{v.environment.capitalize} now: #{v}"
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)
@@ -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, "#{self.class.name} file does not exist. (#{@config_file})"
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, "#{self.class.name} file does not exist. (#{base_dir_or_config_file})"
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)
@@ -6,9 +6,9 @@ module Versioneer
6
6
 
7
7
  def initialize(file_within_repo, options=nil)
8
8
  super
9
- unless file_within_repo.is_a? Dir and Dir.join('.git').exist?
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, 'Not a git repo.'
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.0
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-01 00:00:00.000000000 Z
11
+ date: 2017-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler