rsync-deploy 0.0.16 → 0.1.0
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/.gitignore +2 -1
- data/README.md +23 -3
- data/bin/deploy +0 -2
- data/lib/deploy/version.rb +1 -1
- data/lib/deploy.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7099df327d321811dbc7056ecf72b193192b8f6
|
4
|
+
data.tar.gz: 20ae2c3b2bbf1efc270f990435d868f1c2725c81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adbd2c994dd599b7d93e63e36a6136134971cb9380f7fdc0a261583b2c94c4a7889d0b0fbae8c8b5515a500ea52f6ebe1d65b0f459dbae1b092071a163d71e48
|
7
|
+
data.tar.gz: 085119d2dbc794f42fb42c92bc98142180341fa9ceea5bd0e483accd4c5b1245003721fa4ae43b7c7eae1bd7b06f514efd62725345fc4e52f0c4e0f97b643e03
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -23,13 +23,16 @@ This will create a `deploy.yml` file that controls how the deployment should tak
|
|
23
23
|
Fill in your server details. For example:
|
24
24
|
|
25
25
|
```
|
26
|
-
# Server
|
27
26
|
server_name:
|
28
27
|
host: "server.com"
|
29
28
|
user: "user"
|
29
|
+
sync: true
|
30
30
|
path:
|
31
31
|
local: "deploy/"
|
32
32
|
remote: "www/"
|
33
|
+
exclude:
|
34
|
+
- ".DS_Store"
|
35
|
+
- "resources/"
|
33
36
|
```
|
34
37
|
|
35
38
|
Once your `deploy.yml` is set up, simply deploy by running:
|
@@ -60,7 +63,7 @@ deploy dev staging production
|
|
60
63
|
|
61
64
|
#### deploy download [env...]
|
62
65
|
|
63
|
-
Will download from the environment(s) listed. This works in reverse, so files from `path.remote` will go into `path.local
|
66
|
+
Will download from the environment(s) listed. This works in reverse, so files from `path.remote` will go into `path.local`. This will never delete files that aren't on the server, but will likely overwrite your local copies, so be careful.
|
64
67
|
|
65
68
|
This command is also aliased as `down` and `d`, so it can be run like:
|
66
69
|
|
@@ -79,7 +82,7 @@ Will change the name of deployment configuration files. By default they are name
|
|
79
82
|
|
80
83
|
#### deploy help
|
81
84
|
|
82
|
-
Will output a list of all commands
|
85
|
+
Will output a list of all commands.
|
83
86
|
|
84
87
|
|
85
88
|
## Config
|
@@ -217,6 +220,23 @@ deploy staging production
|
|
217
220
|
|
218
221
|
If you don't specify an environment, it's assumed that the first environment in `deploy.yml` should be used. So, with the above configuration, running `deploy` would upload to `staging` by default.
|
219
222
|
|
223
|
+
## Autocompletion
|
224
|
+
|
225
|
+
To enable tab-completion based for commands and the current directory's environments, put in your `~/.bash_profile` the following code:
|
226
|
+
|
227
|
+
```
|
228
|
+
# Add tab completion for `deploy` configurations in current directory
|
229
|
+
_dply()
|
230
|
+
{
|
231
|
+
local cur=${COMP_WORDS[COMP_CWORD]}
|
232
|
+
local file=$(cat $(ruby -e "puts Gem::Specification.find_by_name('rsync-deploy').gem_dir + '/lib/config.yml'") | awk '{print $2}')
|
233
|
+
if [ -f $file ]; then
|
234
|
+
ENVS=$(ls $PWD | grep ":$" $file | sed '/^ /d' | tr -d ':')
|
235
|
+
fi
|
236
|
+
COMPREPLY=($(compgen -W "${ENVS} install config list help version" -- $cur))
|
237
|
+
}
|
238
|
+
complete -o "default" -F _dply deploy
|
239
|
+
```
|
220
240
|
|
221
241
|
## Mentions
|
222
242
|
|
data/bin/deploy
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'deploy'
|
4
|
-
require 'fileutils'
|
5
4
|
|
6
5
|
# TODO: Allow creation of environments from install command, for example
|
7
6
|
# `deploy install live dev` would create a file with live and dev
|
@@ -142,6 +141,5 @@ when 'config'
|
|
142
141
|
exit
|
143
142
|
end
|
144
143
|
|
145
|
-
|
146
144
|
# Run the deploy straight if nothing else triggered
|
147
145
|
go(false)
|
data/lib/deploy/version.rb
CHANGED
data/lib/deploy.rb
CHANGED