arethusa-cli 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arethusa/cli/version.rb +1 -1
- data/lib/arethusa/cli.rb +8 -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: 14e29348d945f3d8d08493d1501b8396882cd236
|
4
|
+
data.tar.gz: d4dcaa9f3631ce4e865545c4db2015d6f707c3b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe8b6ec67cf4b514db93c456bcb662d87996f0b19f12af187d3044933441a652bfb9d60bf789ed92ae73dca5347ee206f677a5d135766b00bbfb39b167534390
|
7
|
+
data.tar.gz: d6cb31f7e179feaee206f29836f4b9da1b97885adc6f14234eeb9d253e964ae85b58b5ddc8b300db6249edc8128c7984e75252ec833a449b1ad74bd1b18dda8f
|
data/lib/arethusa/cli/version.rb
CHANGED
data/lib/arethusa/cli.rb
CHANGED
@@ -53,9 +53,11 @@ EOF
|
|
53
53
|
desc: 'Deploys only Arethusa files without third party code'
|
54
54
|
method_option :minify, aliases: '-m', type: :boolean, default: true,
|
55
55
|
desc: 'Minifies Arethusa before building'
|
56
|
+
method_option :commit, aliases: '-c', type: :boolean,
|
57
|
+
desc: 'Deploy in a subfolder, referenced by the current commit sha'
|
56
58
|
def deploy(address, directory)
|
57
59
|
@address = address
|
58
|
-
@directory = directory
|
60
|
+
@directory = options[:commit] ? File.join(directory, short_sha) : directory
|
59
61
|
@ssh_options = options[:options]
|
60
62
|
@archive = options[:file]
|
61
63
|
|
@@ -158,6 +160,7 @@ EOF
|
|
158
160
|
|
159
161
|
# For deploy command
|
160
162
|
def execute
|
163
|
+
`#{ssh} mkdir -p #{@directory}`
|
161
164
|
`#{archive_to_use} | #{ssh} #{decompress}`
|
162
165
|
end
|
163
166
|
|
@@ -165,6 +168,10 @@ EOF
|
|
165
168
|
"tar -zc #{folders_to_deploy.join(' ')}"
|
166
169
|
end
|
167
170
|
|
171
|
+
def short_sha
|
172
|
+
`git rev-parse --short HEAD`
|
173
|
+
end
|
174
|
+
|
168
175
|
def archive_to_use
|
169
176
|
@archive ? "cat #{@archive}" : compress
|
170
177
|
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.5
|
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
|
+
date: 2014-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|