prima-twig 0.2.10 → 0.2.12
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/bin/twig-deploy +10 -10
- 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: 510aa2cae37bc86afd3b8f4ee8c19061cfabbdf9
|
|
4
|
+
data.tar.gz: 5cb119298a3c479307ceb31b98b9a743a22d72e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5a0e3bf3e65778693f82899981db63156de71523fdb3387102dc2f58d939a9ed0fcb954d3fdbd7cb8adcce933a1e2c0684933e18ef0369ba8655f348495155a
|
|
7
|
+
data.tar.gz: 99029f1cb6a7170aec2c9ecfa5a7a594e45703a3054866e113a5d8ac9caa1bfe473ecf00f069d1880211564a1627d3e1bb9f46bdf688344125df6c01f2ce8222
|
data/bin/twig-deploy
CHANGED
|
@@ -51,19 +51,19 @@ class Review
|
|
|
51
51
|
output "Recupero degli artifacts in corso, attendi qualche secondo...".yellow
|
|
52
52
|
artifacts = get_artifacts
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
artifact_rev = choose do |menu|
|
|
55
55
|
menu.prompt = 'Scegli la release da deployare: '.cyan
|
|
56
56
|
menu.shell = true
|
|
57
57
|
|
|
58
|
-
artifacts.each do |
|
|
59
|
-
branch =
|
|
60
|
-
title = @prima.reduce_size(branch, 100)
|
|
61
|
-
msg = "#{title}"
|
|
62
|
-
menu.choice(msg) {
|
|
58
|
+
artifacts.each do |v|
|
|
59
|
+
branch = v[:branch]
|
|
60
|
+
title = @prima.reduce_size(branch, 100)
|
|
61
|
+
msg = "#{title} #{v[:created_at].strftime('%d/%m/%Y %H:%M:%S')} #{v[:rev]}".light_blue
|
|
62
|
+
menu.choice(msg) {v[:rev]}
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
deploy_command = "bin/deploy #{
|
|
66
|
+
deploy_command = "bin/deploy #{artifact_rev}"
|
|
67
67
|
|
|
68
68
|
output "Il comando per il deploy sara': #{deploy_command}".yellow
|
|
69
69
|
|
|
@@ -106,7 +106,7 @@ class Review
|
|
|
106
106
|
|
|
107
107
|
def get_artifacts
|
|
108
108
|
rev_already_downloaded = []
|
|
109
|
-
artifacts =
|
|
109
|
+
artifacts = []
|
|
110
110
|
s3 = Aws::S3::Client.new
|
|
111
111
|
resp = s3.list_objects(bucket: 'prima-deploy', prefix: 'artifacts')
|
|
112
112
|
resp.contents.each do |l|
|
|
@@ -114,10 +114,10 @@ class Review
|
|
|
114
114
|
if rev && l.key.include?('prod_') && !rev_already_downloaded.include?(rev)
|
|
115
115
|
rev_already_downloaded << rev
|
|
116
116
|
object = s3.head_object(bucket: 'prima-deploy', key: l.key)
|
|
117
|
-
artifacts
|
|
117
|
+
artifacts << {rev: rev, created_at: object.last_modified, branch: object.metadata['branch']} if object.metadata.has_key? 'branch'
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
|
-
artifacts
|
|
120
|
+
artifacts.sort_by { |v| v[:created_at] }.reverse
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prima-twig
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matteo Giachino
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2015-
|
|
14
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: twig
|