capistrano-gitinfos 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5928db9b9dbe3837f813a7a6af14be38f8696b1b
4
- data.tar.gz: 6dda2c96777be905b3ccf14aba22a7f284a41d7d
3
+ metadata.gz: 37f55b026baa128a63aa4ed0e1f78ffd5a172b7c
4
+ data.tar.gz: b84a2e1a3d3eae25b30e691409dd60df927b8109
5
5
  SHA512:
6
- metadata.gz: 9db10cbd76a5fdcdbb9c35c53e84439a1ab23cf8eb0b8a07ff5edb8048e3314fb0f13fbd47c2f5c41b66058d13b9416a07bf5b5dc3bd550e38f29bceaec2b68d
7
- data.tar.gz: 357d2524a85674431659011211bde1144a9ef0eb91dad1aa7c7e7a0dd51af210725b090740a5f3ab6599ace3dcea8f6dfc51ddcbf88b4ae15e7f693e641e1b36
6
+ metadata.gz: f9eacbdfc51c38d3dca1ec4dd7c53d2d8791fdc6f9f4c511a7469a225defaee002cde5b2e910410d595c0dc2e3bb608cdf892d630940fb6dbb0358efe479770d
7
+ data.tar.gz: 017bce1db47be59a43df44ed37a06678e2027ed7a39b055c8f880059411ff7270f59f288685b24fbe35b2f678e9d990913f4287a128dba6a83c1e5a8176e0d10
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Gitinfos
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -2,13 +2,17 @@ def getGitInfos(commit)
2
2
  rawCommitDate = capture(:git, "log -1 --pretty=tformat:'{%ci}' --no-color --date=local #{commit}").slice(/\{(.+)\}/,1).sub(/\s/, 'T').sub(/\s/, '')
3
3
  abbrevCommit = capture(:git, "rev-list --max-count=1 --abbrev-commit #{commit}")
4
4
  fullCommit = capture(:git, "rev-list --max-count=1 --no-abbrev-commit #{commit}")
5
- version = capture(:git, "describe --tag #{commit}")
5
+ begin
6
+ version = capture(:git, "describe --tag #{commit}")
7
+ rescue SSHKit::Runner::ExecuteError => e
8
+ version = abbrevCommit
9
+ end
6
10
 
7
11
  if version.empty?
8
12
  version = abbrevCommit
9
13
  end
10
14
 
11
- deployDate = Time.strptime(release_timestamp, "%Y%m%d%H%M%S").in_time_zone
15
+ deployDate = Time.strptime(release_timestamp, "%Y%m%d%H%M%S")
12
16
  commitDate = Time.strptime(rawCommitDate, "%Y-%m-%dT%H:%M:%S%z").in_time_zone
13
17
 
14
18
  return {
@@ -37,7 +41,7 @@ commit_timestamp: '#{infos['commit_timestamp']}'
37
41
  deploy_date: '#{infos['deploy_date']}'
38
42
  deploy_timestamp: '#{infos['deploy_timestamp']}'
39
43
  YAML
40
-
44
+
41
45
  when "xml"
42
46
  builder = Nokogiri::XML::Builder.new do |xml|
43
47
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-gitinfos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Sanquer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano