capistrano-gitinfos 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +66 -0
- data/lib/capistrano/gitinfos/version.rb +1 -1
- data/lib/capistrano/tasks/gitinfos.rake +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5928db9b9dbe3837f813a7a6af14be38f8696b1b
|
4
|
+
data.tar.gz: 6dda2c96777be905b3ccf14aba22a7f284a41d7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db10cbd76a5fdcdbb9c35c53e84439a1ab23cf8eb0b8a07ff5edb8048e3314fb0f13fbd47c2f5c41b66058d13b9416a07bf5b5dc3bd550e38f29bceaec2b68d
|
7
|
+
data.tar.gz: 357d2524a85674431659011211bde1144a9ef0eb91dad1aa7c7e7a0dd51af210725b090740a5f3ab6599ace3dcea8f6dfc51ddcbf88b4ae15e7f693e641e1b36
|
data/README.md
CHANGED
@@ -39,6 +39,72 @@ set :gitinfos_format, "json"
|
|
39
39
|
set :gitinfos_file, "version"
|
40
40
|
```
|
41
41
|
|
42
|
+
After deploying, you will get a file with the following informations:
|
43
|
+
|
44
|
+
* full_commit : git full SHA1 commit
|
45
|
+
* abbrev_commit : git abbrev SHA1 commit
|
46
|
+
* version : the result of `git describe --tags` command if possible, otherwise the abbrev commit
|
47
|
+
* commit_date : commit date in IS08601 format (with timezone)
|
48
|
+
* commit_timestamp : commit date in unix timestamp format
|
49
|
+
* deploy_date : capistrano deploy date in IS08601 format (with timezone)
|
50
|
+
* deploy_timestamp : capistrano deploy date in unix timestamp format
|
51
|
+
|
52
|
+
e.g. :
|
53
|
+
|
54
|
+
* version.json
|
55
|
+
|
56
|
+
```json
|
57
|
+
{
|
58
|
+
"commit_date": "2015-11-25T16:25:50+0000",
|
59
|
+
"full_commit": "576e27c6ebcef6987f143e1468a815eaf2eb8bc1",
|
60
|
+
"version": "v0.8.0-268-g576e27c",
|
61
|
+
"commit_timestamp": "1448468750",
|
62
|
+
"deploy_date": "2015-11-25T16:45:39+0000",
|
63
|
+
"deploy_timestamp": "1448469939",
|
64
|
+
"abbrev_commit": "576e27c"
|
65
|
+
}
|
66
|
+
```
|
67
|
+
|
68
|
+
* version.ini
|
69
|
+
|
70
|
+
```ini
|
71
|
+
[app_version]
|
72
|
+
commit_date = 2015-11-25T16:25:50+0000
|
73
|
+
full_commit = 576e27c6ebcef6987f143e1468a815eaf2eb8bc1
|
74
|
+
version = v0.8.0-268-g576e27c
|
75
|
+
commit_timestamp = 1448468750
|
76
|
+
deploy_date = 2015-11-25T16:45:43+0000
|
77
|
+
deploy_timestamp = 1448469943
|
78
|
+
abbrev_commit = 576e27c
|
79
|
+
```
|
80
|
+
|
81
|
+
* version.yml
|
82
|
+
|
83
|
+
```yml
|
84
|
+
abbrev_commit: 576e27c
|
85
|
+
commit_date: 2015-11-25T16:25:50+0000
|
86
|
+
commit_timestamp: '1448468750'
|
87
|
+
deploy_date: 2015-11-25T16:45:41+0000
|
88
|
+
deploy_timestamp: '1448469941'
|
89
|
+
full_commit: 576e27c6ebcef6987f143e1468a815eaf2eb8bc1
|
90
|
+
version: v0.8.0-268-g576e27c
|
91
|
+
```
|
92
|
+
|
93
|
+
* version.xml
|
94
|
+
|
95
|
+
```xml
|
96
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
97
|
+
<app_version>
|
98
|
+
<commit_date>2015-11-25T16:25:50+0000</commit_date>
|
99
|
+
<full_commit>576e27c6ebcef6987f143e1468a815eaf2eb8bc1</full_commit>
|
100
|
+
<version>v0.8.0-268-g576e27c</version>
|
101
|
+
<commit_timestamp>1448468750</commit_timestamp>
|
102
|
+
<deploy_date>2015-11-25T16:45:48+0000</deploy_date>
|
103
|
+
<deploy_timestamp>1448469948</deploy_timestamp>
|
104
|
+
<abbrev_commit>576e27c</abbrev_commit>
|
105
|
+
</app_version>
|
106
|
+
```
|
107
|
+
|
42
108
|
## Contributing
|
43
109
|
|
44
110
|
Bug reports and pull requests are welcome on GitHub at https://github.com/kilix/capistrano-gitinfos.
|
@@ -25,8 +25,19 @@ end
|
|
25
25
|
def formatGitInfos(infos, format)
|
26
26
|
case format
|
27
27
|
when "yml"
|
28
|
-
|
29
|
-
|
28
|
+
# TODO find option to force quoting to prevent abbrev_commit to be read as float in YAML
|
29
|
+
# return YAML.dump(infos)
|
30
|
+
return <<-YAML
|
31
|
+
---
|
32
|
+
version: '#{infos['version']}'
|
33
|
+
abbrev_commit: '#{infos['abbrev_commit']}'
|
34
|
+
full_commit: '#{infos['full_commit']}'
|
35
|
+
commit_date: '#{infos['commit_date']}'
|
36
|
+
commit_timestamp: '#{infos['commit_timestamp']}'
|
37
|
+
deploy_date: '#{infos['deploy_date']}'
|
38
|
+
deploy_timestamp: '#{infos['deploy_timestamp']}'
|
39
|
+
YAML
|
40
|
+
|
30
41
|
when "xml"
|
31
42
|
builder = Nokogiri::XML::Builder.new do |xml|
|
32
43
|
|
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.
|
4
|
+
version: 0.0.3
|
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-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|