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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/promote/git_repo.rb +9 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb424b77aa97cce9191d6df114ccc6b701e19e82
4
- data.tar.gz: a8a85d279d0b69a11e5a86516ac7d40301897be8
3
+ metadata.gz: e2370bdc623649f9e637860660924b608082218b
4
+ data.tar.gz: f135f36d0350951f7febdef6140305f1651be392
5
5
  SHA512:
6
- metadata.gz: 7c047e9e667035cc623f7ea8aa853aab61edb7295f5b2cb3112a0453b1d457849ee55acdafd768b456c47ccdf33eb02c3a00060fb8ba3c22be6c099e0665879b
7
- data.tar.gz: 48d2a8f1b4fef909c3ad07d7a5ec877e4fff538b8d74b374e4ca1fab963b31970883ecab2eb783b2992e221c9b6f5fb5009b4579cf9d53b84a03bdc80b28efd8
6
+ metadata.gz: 9f11ef5e6010171f4426a80199fda83858bf74cb96a894ebb0ec204db055cdcbeb52a8937bec4115fe01dbcaffa0bc391aaf712ce067eb212f1695647cfda28f
7
+ data.tar.gz: 6f8a51ac03ba749090c2c7f7c7a12c2fd7b121b9b3779b8491fa78960713e21f830f22ff431d8320af5ebb120b1216a27abb7e8024f340bc7889e38cb31edbf4
@@ -5,8 +5,8 @@ module Promote
5
5
  end
6
6
 
7
7
  def version_number
8
- all_commit_count = git.log(10000).object(scope_path).between(current_tag.sha).size
9
- bump_commit_count = git.log(10000).object(scope_path).between(current_tag.sha).grep("CI:versioning chef artifacts").size
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 ||= git.log(10000).between(current_tag.sha).first.sha
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))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clc-promote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.dev.4
4
+ version: 0.4.0.dev.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud