clc-promote 0.4.0.dev.4 → 0.4.0.dev.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promote/git_repo.rb +9 -3
- 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: e2370bdc623649f9e637860660924b608082218b
|
4
|
+
data.tar.gz: f135f36d0350951f7febdef6140305f1651be392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f11ef5e6010171f4426a80199fda83858bf74cb96a894ebb0ec204db055cdcbeb52a8937bec4115fe01dbcaffa0bc391aaf712ce067eb212f1695647cfda28f
|
7
|
+
data.tar.gz: 6f8a51ac03ba749090c2c7f7c7a12c2fd7b121b9b3779b8491fa78960713e21f830f22ff431d8320af5ebb120b1216a27abb7e8024f340bc7889e38cb31edbf4
|
data/lib/promote/git_repo.rb
CHANGED
@@ -5,8 +5,8 @@ module Promote
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def version_number
|
8
|
-
all_commit_count =
|
9
|
-
bump_commit_count =
|
8
|
+
all_commit_count = log.size
|
9
|
+
bump_commit_count = log.grep("CI:versioning chef artifacts").size
|
10
10
|
commit_count = all_commit_count - bump_commit_count
|
11
11
|
"#{current_tag.name}.#{commit_count}"
|
12
12
|
end
|
@@ -27,7 +27,7 @@ module Promote
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def sha1
|
30
|
-
@sha1 ||=
|
30
|
+
@sha1 ||= log.first.sha
|
31
31
|
end
|
32
32
|
|
33
33
|
def commit(msg, push = false)
|
@@ -42,6 +42,12 @@ module Promote
|
|
42
42
|
|
43
43
|
private
|
44
44
|
|
45
|
+
def log
|
46
|
+
result = git.log(10000).object(scope_path)
|
47
|
+
result = result.between(current_tag.sha) unless current_tag.sha.empty?
|
48
|
+
result
|
49
|
+
end
|
50
|
+
|
45
51
|
def git_root(start_leaf)
|
46
52
|
return start_leaf if File.exist?(File.join(start_leaf, '.git'))
|
47
53
|
git_root(File.expand_path('..', start_leaf))
|