yolo 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +0,0 @@
1
- example:
2
- tag: "v1.0"
3
- commit: "akovjnse82394kfbisdop"
@@ -45,15 +45,22 @@ module Yolo
45
45
  #
46
46
  # @return [BOOL] returns if there is a new tag to build
47
47
  def has_new_tag(name)
48
+ new_tag = false
48
49
  set_project_name(name)
49
- if yaml_tag == latest_tag
50
+
51
+ if latest_tag
52
+ if yaml_tag != latest_tag or has_new_commit(name)
53
+ @formatter.new_tag(latest_tag)
54
+ update_tag(latest_tag)
55
+ new_tag = true
56
+ end
57
+ end
58
+
59
+ unless new_tag
50
60
  @formatter.no_new_tag
51
- false
52
- else
53
- @formatter.new_tag(latest_tag)
54
- update_tag(latest_tag)
55
- true
56
61
  end
62
+
63
+ new_tag
57
64
  end
58
65
 
59
66
  #
@@ -51,9 +51,17 @@ describe Yolo::Tools::Git do
51
51
  it "should recognise existing tags" do
52
52
  Yolo::Tools::Git.any_instance.stub(:yaml_tag){"old"}
53
53
  Yolo::Tools::Git.any_instance.stub(:latest_tag){"old"}
54
+ Yolo::Tools::Git.any_instance.stub(:has_new_commit){false}
54
55
  @git.has_new_tag("").should eq(false)
55
56
  end
56
57
 
58
+ it "should recognise a retagged commit" do
59
+ Yolo::Tools::Git.any_instance.stub(:yaml_tag){"old"}
60
+ Yolo::Tools::Git.any_instance.stub(:latest_tag){"old"}
61
+ Yolo::Tools::Git.any_instance.stub(:has_new_commit){true}
62
+ @git.has_new_tag("").should eq(true)
63
+ end
64
+
57
65
  it "yaml commit should be empty if no project is set" do
58
66
  @git.project_name = nil
59
67
  @git.instance_eval{yaml_commit}.should eq("")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-28 00:00:00.000000000 Z
12
+ date: 2013-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xcodebuild-rb
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 1.8.24
163
+ rubygems_version: 1.8.23
164
164
  signing_key:
165
165
  specification_version: 3
166
166
  summary: YOLO!