arethusa-cli 0.1.10 → 0.1.11
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/lib/arethusa/cli/version.rb +1 -1
- data/lib/arethusa/cli.rb +9 -1
- 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: b870671c8b309546a6f22d51da826165bcdd862f
|
4
|
+
data.tar.gz: 03e910e77a0f49a502c9efbdb2b2796c231cf6d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df54e4bc91332ba282719f8cc9c0e8a84d99644b52fcfd5ae6f1eb5b8904a2d5b343000345d9bbc5e87a84c2acb406fbe5841fc5b239bc44105b40a9c6181bfb
|
7
|
+
data.tar.gz: 047247c6b3071837486f4268a8ec180af2dbe7ac04856451d6f67ac965504f06af2ac00142fc278f8e43ab1ac126bd8a00a719fc280b4c21505a8c67531fbca4
|
data/lib/arethusa/cli/version.rb
CHANGED
data/lib/arethusa/cli.rb
CHANGED
@@ -55,13 +55,16 @@ EOF
|
|
55
55
|
desc: 'Minifies Arethusa before building'
|
56
56
|
method_option :commit, aliases: '-c', type: :boolean,
|
57
57
|
desc: 'Deploy in a subfolder, referenced by the current commit sha'
|
58
|
+
method_option :environment, aliases: '-e',
|
59
|
+
desc: 'Releases the build by calling the server-side script depl-help-deploy in a given environment. Check http://github.com/LFDM/deployment-helpers for additional documentation.'
|
58
60
|
method_option :sudo, type: :boolean,
|
59
61
|
desc: 'Run ssh commands as sudo'
|
60
62
|
def deploy(address, directory)
|
61
63
|
@address = address
|
62
|
-
@directory = options[:commit] ? File.join(directory, short_sha) : directory
|
64
|
+
@directory = options[:commit] ? File.join(directory, short_sha).strip : directory
|
63
65
|
@ssh_options = options[:options]
|
64
66
|
@archive = options[:file]
|
67
|
+
@environment = options[:environment]
|
65
68
|
|
66
69
|
if options[:sudo]
|
67
70
|
@sudo = true
|
@@ -74,6 +77,7 @@ EOF
|
|
74
77
|
|
75
78
|
create_deploy_directory
|
76
79
|
execute
|
80
|
+
use_deployment_helper if @environment
|
77
81
|
say_status(:deployed, "at #{@address} - #{@directory}")
|
78
82
|
end
|
79
83
|
|
@@ -180,6 +184,10 @@ EOF
|
|
180
184
|
`#{archive_to_use} | #{ssh} #{decompress}`
|
181
185
|
end
|
182
186
|
|
187
|
+
def use_deployment_helper
|
188
|
+
`#{ssh} depl-help-deploy arethusa #{@directory} #{@environment}`
|
189
|
+
end
|
190
|
+
|
183
191
|
def compress
|
184
192
|
"tar -zc #{folders_to_deploy.join(' ')}"
|
185
193
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arethusa-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LFDM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|