arethusa-cli 0.1.10 → 0.1.11

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
  SHA1:
3
- metadata.gz: 660bfff17d17e0fa41a4d55130358da7bf667693
4
- data.tar.gz: 132b7b26160419f188460a9898273b1a31340d32
3
+ metadata.gz: b870671c8b309546a6f22d51da826165bcdd862f
4
+ data.tar.gz: 03e910e77a0f49a502c9efbdb2b2796c231cf6d6
5
5
  SHA512:
6
- metadata.gz: 97a70c915243ec47bc1b6271bde540335eb2e64264d9d80bb75922e29374546d326aab055da8850c5244cfd2e9bc870fda0a20a937199f6a092a85eae60f96c8
7
- data.tar.gz: d63dc88ca36c584e13696a0aa48053ee83dcbfa7aad27ef947f66163e74a5ee8c74fed24b5fed18913c1cceead40e3f27484fdcf8666e22f95996c88159f1031
6
+ metadata.gz: df54e4bc91332ba282719f8cc9c0e8a84d99644b52fcfd5ae6f1eb5b8904a2d5b343000345d9bbc5e87a84c2acb406fbe5841fc5b239bc44105b40a9c6181bfb
7
+ data.tar.gz: 047247c6b3071837486f4268a8ec180af2dbe7ac04856451d6f67ac965504f06af2ac00142fc278f8e43ab1ac126bd8a00a719fc280b4c21505a8c67531fbca4
@@ -1,5 +1,5 @@
1
1
  module Arethusa
2
2
  class CLI
3
- VERSION = "0.1.10"
3
+ VERSION = "0.1.11"
4
4
  end
5
5
  end
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.10
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-02 00:00:00.000000000 Z
11
+ date: 2014-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler