nixenvironment 0.0.153 → 0.0.154
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nixenvironment/scm.rb +5 -5
- data/lib/nixenvironment/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e254a82fa92ae3fd4d9c70ad1a4f7b9f172b7b09cce5ce47e8f3696ccfbf933d
|
4
|
+
data.tar.gz: 43fe39225fa26344eec9452c1de970faabb305ce278a8383b0138bfba1e69e10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c180300159a23e6b304ad340fc5a35a7a564c0ab37eae4168f5e84bbd6013737f1d4c1aec874ee3b2443b52fdffd1ffbcc897a61918bb8cc0e52cbe0c96a21c
|
7
|
+
data.tar.gz: 84267868ec2cc9214c8b21d44b3d081e4b44465318aeec3fb81348361d8d25abecdae0d77cf175e5187f2bdb599c80832d4232e18ee998c0528fec561e7db11a
|
data/lib/nixenvironment/scm.rb
CHANGED
@@ -37,13 +37,13 @@ module Nixenvironment
|
|
37
37
|
current_revision = %x[ git rev-parse HEAD ]
|
38
38
|
last_revision_in_repo = %x[ git rev-list --all -n 1 ]
|
39
39
|
|
40
|
-
date_format = ENV
|
41
|
-
if date_format
|
42
|
-
# revision in datetime format
|
43
|
-
current_monotonic_revision = %x[ git log -1 --date=format:"%Y%m%d" --format="%ad" ]
|
44
|
-
else
|
40
|
+
date_format = ENV['USE_DATEFORMAT']
|
41
|
+
if date_format == nil
|
45
42
|
# number of pushes before current
|
46
43
|
current_monotonic_revision = %x[ git rev-list --all --count ]
|
44
|
+
else
|
45
|
+
# revision in datetime format
|
46
|
+
current_monotonic_revision = %x[ git log -1 --date=format:"%Y%m%d" --format="%ad" ]
|
47
47
|
end
|
48
48
|
|
49
49
|
if current_revision == last_revision_in_repo
|