nixenvironment 0.0.157 → 0.0.158

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
  SHA256:
3
- metadata.gz: 1854a942fcd0763f98dac3febaedc9ce41909ef8f36a183b22155e12ae597447
4
- data.tar.gz: fb6babdc92b77a9bbe918c7e28b7a12b415e227eb4cc73d49b199ceb9916570f
3
+ metadata.gz: 1f26bfb369f715e1ed1ea43be611edb4b5b9d07156048265a1b16ae0f963ee05
4
+ data.tar.gz: 18850f9096d43b6a2a44c6610d757a116fc049b8fdeee7407e39d423fcb41f51
5
5
  SHA512:
6
- metadata.gz: 9d5d0fc3e45ba8b270ed1a487000e9e01559cc359030b52aa278666b8a27f2c39e10338070cc3a6758bf16298bd55f652aa58b2ef85ab0f2690a279fece31147
7
- data.tar.gz: 45d9bfb866b6c26ac0f5c4de566bde91e2fcbcd64db9a26510ee3c3955eae7ac594eec3756eefa8c179d207519f13b5460a0575c4c10f6043447897119b2a30d
6
+ metadata.gz: 5d8a84b2c7424559bf278ecd2390f6a8832c0e11fa1675a1d5ad143dec4d1accc010a0fa529d0a96bc9afeca08c6ba2d2860b635ca7b475e0536d40bfdadade8
7
+ data.tar.gz: 56768bb78f29969f4d0f677d998f7d86b0be29cd7d17c8e2d5d702a66297111c59d6b85032f3c3c9080a24bae2cfb4f2c328e93f62852eee46369b769139fdc9
@@ -34,11 +34,10 @@ module Nixenvironment
34
34
  end
35
35
  when SCM_GIT
36
36
  puts 'GIT working copy detected'
37
- current_revision = %x[ git rev-parse HEAD ]
38
- last_revision_in_repo = %x[ git rev-list --all -n 1 ]
39
37
 
40
- date_format = ENV['USE_DATEFORMAT']
41
- if date_format == nil
38
+ if (defined?(ENV['USE_DATEFORMAT'])).nil?
39
+ current_revision = %x[ git rev-parse HEAD ]
40
+ last_revision_in_repo = %x[ git rev-list --all -n 1 ]
42
41
  # number of pushes before current
43
42
  current_monotonic_revision = %x[ git rev-list --all --count ]
44
43
  if current_revision == last_revision_in_repo
@@ -48,8 +47,15 @@ module Nixenvironment
48
47
  # revision in datetime format
49
48
  git_commit_timestamp = %x[ git show -s --format=%ct #{last_revision_in_repo} ]
50
49
  git_result = Time.at(git_commit_timestamp.to_i)
51
- current_monotonic_revision = "#{git_result.year.to_s[2,2].to_i}#{git_result.month}#{git_result.day}.#{git_result.hour}#{git_result.min}#{git_result.sec}"
52
- #current_monotonic_revision = %x[ git log -1 --date=format:"%Y%m%d.%H%M%S" --format="%ad" ]
50
+ year = "%02d" % git_result.year.to_s[2,2].to_i
51
+ month = "%02d" % git_result.month
52
+ day = "%02d" % git_result.day
53
+ hour = "%02d" % git_result.hour
54
+ min = "%02d" % git_result.min
55
+ sec = "%02d" % git_result.sec
56
+ current_monotonic_revision = " #{year}#{month}#{day}.#{hour}#{min}#{sec} "
57
+ current_revision = " #{year}#{month}#{day}.#{hour}#{min}#{sec} "
58
+ #current_monotonic_revision = %x[ git log -1 --date=format:"%Y%m%d.%H%M%S" --format="%ad" ] #old one
53
59
  end
54
60
 
55
61
  status = %x[ git status --porcelain ]
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.157'
2
+ VERSION = '0.0.158'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nixenvironment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.157
4
+ version: 0.0.158
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-11-29 00:00:00.000000000 Z
12
+ date: 2019-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocoapods
@@ -337,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
337
  version: '0'
338
338
  requirements: []
339
339
  rubyforge_project:
340
- rubygems_version: 2.7.8
340
+ rubygems_version: 2.7.4
341
341
  signing_key:
342
342
  specification_version: 4
343
343
  summary: NIX projects build and deploy utility