rake_roll 0.3.0 → 0.4.0

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: 1ccd20155b3e6cf82380e3d978d4a1ca99fd44a4
4
- data.tar.gz: de484a20f8780528379d18db914d1f375419ddc9
3
+ metadata.gz: cbe2dac908a11530fc05ae8d78ee4a0ffcba7b00
4
+ data.tar.gz: 9fd1bc7c3c680169418b6471974d8b6f69f16aca
5
5
  SHA512:
6
- metadata.gz: fdd2e6a562d0ba236cad05e66cadb243bcb32f8397669d4375c48da0dc1a1dc35b428b0b718f35d48d138349c6324418db7b7eae577fae7aaccc20d9040dbc22
7
- data.tar.gz: 3372c58dfe06b23d2f1fe99afb4d97a57d1fab6d58d53b1c51db90c7eaa63c3a1f55986ee04f887b62de128d01a385a74a078c30581efdcaa4c4994275f7ec79
6
+ metadata.gz: e867f8accd49a6a8332c636167f7e03cd87967e585ca7c4a8096c4828651750028fac44a5c789b3c0f51ecaf89b2c46bc43b3fbd13e09c7c0622a02476209995
7
+ data.tar.gz: f637475f0cdcb81217b9ca0ab4744f5bfa4b23a6d6130626e93090e52f7ecad61325a5d6deb543cb5fb8d6e5d45f9d59b6406c8da01fff69b965ea1271fc4311
data/README.md CHANGED
@@ -25,6 +25,7 @@ Or install it yourself as:
25
25
  rake roll:bump # Bump to 0.1.1
26
26
  rake roll:major # Bump to 1.0.0
27
27
  rake roll:minor # Bump to 0.2.0
28
+ rake roll:next # run and update changelog without creating a tag
28
29
 
29
30
  The above will do a dry run, and show the changelog updates in the
30
31
  terminal window
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -58,12 +58,13 @@ module RakeRoll
58
58
  def push
59
59
  puts "Rake Rolling..."
60
60
  puts "WARNING: no new CHANGELOG commits added" if parsed_git_log.empty?
61
- update_version_file
61
+ update_version_file unless next_version?
62
+ clean_changelog_next
62
63
  update_changelog
63
64
  git_commit("Updating Version to #{new_version}")
64
- git_tag(new_version)
65
+ git_tag(new_version) unless next_version?
65
66
  git_push_branch(@current_branch)
66
- git_push_tags
67
+ git_push_tags unless next_version?
67
68
  puts RakeRoll::Never.new.line
68
69
  end
69
70
 
@@ -103,5 +104,27 @@ module RakeRoll
103
104
  git_tag("0.0.1")
104
105
  end
105
106
 
107
+ def next_version?
108
+ new_version == test_version
109
+ end
110
+
111
+ def test_version
112
+ RakeRoll::Versioning.new(current_version).test
113
+ end
114
+
115
+ def clean_changelog_next
116
+ puts "cleaning changelog"
117
+ original_file = "CHANGELOG"
118
+ new_file = "changelog.tmp"
119
+ File.open(new_file, "w") do |file|
120
+ in_next = false
121
+ File.foreach(original_file) do |line|
122
+ in_next = true if line.start_with?(test_version)
123
+ in_next = false if line.start_with?(current_version)
124
+ file.puts line unless in_next
125
+ end
126
+ end
127
+ system("mv changelog.tmp CHANGELOG")
128
+ end
106
129
  end
107
130
  end
@@ -9,6 +9,7 @@ task :roll => :environment do
9
9
  puts "rake roll:pre #{roller.current_version} => #{version.pre}"
10
10
  puts "rake roll:minor #{roller.current_version} => #{version.minor}"
11
11
  puts "rake roll:major #{roller.current_version} => #{version.major}"
12
+ puts "rake roll:test #{roller.current_version} => #{version.test} witout tagging"
12
13
  puts "----------------------"
13
14
  puts "Above will do a dry run, Run with PUSH=true to run for real"
14
15
  puts "----------------------"
@@ -67,6 +68,18 @@ namespace :roll do
67
68
  end
68
69
  end
69
70
 
71
+ desc "#{RakeRoll::Roller.new.current_version} => #{RakeRoll::Versioning.new(RakeRoll::Roller.new.current_version).test}"
72
+ task :test => :environment do
73
+ roller = RakeRoll::Roller.new
74
+ version = RakeRoll::Versioning.new(roller.current_version)
75
+ if version.current_version
76
+ roller.new_version = version.test
77
+ do_your_thing(roller, version, "test")
78
+ else
79
+ puts "ERROR: Invalid Version Number #{roller.current_version}"
80
+ end
81
+ end
82
+
70
83
 
71
84
  end
72
85
 
@@ -52,6 +52,10 @@ module RakeRoll
52
52
  end
53
53
  end
54
54
 
55
+ def test
56
+ 'NEXT'
57
+ end
58
+
55
59
  private
56
60
 
57
61
  def validate_current_version(current)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_roll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Hanscombe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-26 00:00:00.000000000 Z
11
+ date: 2017-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.4.8
117
+ rubygems_version: 2.5.1
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: 'RakeRoll: Git version tagger and changelog creator'