dogids-cli 0.0.9 → 0.0.10
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/dogids/deploy/web.rb +20 -11
- data/lib/dogids/ssh/production.rb +1 -1
- data/lib/dogids/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec3f8c06f22edfae0132dcda485cb7193948bb6a
|
4
|
+
data.tar.gz: e567cd03eb3a5e234e9a12bc112f787c0982dcaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 353f5309d01465ccc2608ff5b3879b12b0d7dd46e68b4b043263e898a8215eee9221e65d635c7361f161ba1fd83791ebc72becac8eb15cbac83bf784efdae418
|
7
|
+
data.tar.gz: b0e64d370875ce3030ea639522adae9cfa31723bbbd6698f0346d60d6adcbee8cb2441afc362e77e9b886f44372d51de08d05c059f556bf39f142f94fe123e5e
|
data/lib/dogids/deploy/web.rb
CHANGED
@@ -7,21 +7,29 @@ module Dogids
|
|
7
7
|
def deploy_web
|
8
8
|
print_heading("Deploying dogids.com")
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
server_addresses = [
|
11
|
+
"web2.dogids.codelation.net"
|
12
|
+
]
|
13
|
+
|
14
|
+
server_addresses.each do |server_address|
|
15
|
+
print_command("Server: #{server_address}")
|
15
16
|
|
16
|
-
|
17
|
-
print_command("
|
18
|
-
ssh.exec!(
|
17
|
+
Net::SSH.start(server_address, "dogids") do |ssh|
|
18
|
+
print_command("Checking the current git status")
|
19
|
+
ssh.exec!(web_git_status_command) do |_channel, _stream, data|
|
19
20
|
print_command(data)
|
20
21
|
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
if yes?("-----> Continue with deployment? [no]")
|
24
|
+
print_command("Pulling latest from master")
|
25
|
+
ssh.exec!(web_git_pull_command) do |_channel, _stream, data|
|
26
|
+
print_command(data)
|
27
|
+
end
|
28
|
+
|
29
|
+
print_command("Updating file permissions")
|
30
|
+
ssh.exec!(web_update_permissions_command) do |_channel, _stream, data|
|
31
|
+
print_command(data)
|
32
|
+
end
|
25
33
|
end
|
26
34
|
end
|
27
35
|
end
|
@@ -35,6 +43,7 @@ module Dogids
|
|
35
43
|
def web_git_pull_command
|
36
44
|
commands = []
|
37
45
|
commands << "cd /home/dogids/apps/dogids.com"
|
46
|
+
commands << "sudo chown dogids:dogids -R .git"
|
38
47
|
commands << "sudo chown dogids:www-data -R blog/wp-content"
|
39
48
|
commands << "sudo chown dogids:www-data -R resources"
|
40
49
|
commands << "sudo chown dogids:www-data -R templates"
|
@@ -9,7 +9,7 @@ module Dogids
|
|
9
9
|
puts "Running: `ssh -R 52698:localhost:52698 dogids@db1.dogids.codelation.net`"
|
10
10
|
exec("ssh -R 52698:localhost:52698 dogids@db1.dogids.codelation.net")
|
11
11
|
when "web"
|
12
|
-
puts "Running: `ssh -R 52698:localhost:52698 dogids@
|
12
|
+
puts "Running: `ssh -R 52698:localhost:52698 dogids@web2.dogids.codelation.net`"
|
13
13
|
exec("ssh -R 52698:localhost:52698 dogids@web1.dogids.codelation.net")
|
14
14
|
when "worker"
|
15
15
|
puts "Running: `ssh -R 52698:localhost:52698 dogids@worker1.dogids.codelation.net`"
|
data/lib/dogids/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogids-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Pattison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -90,4 +90,3 @@ signing_key:
|
|
90
90
|
specification_version: 4
|
91
91
|
summary: Command line tool for dogIDs tasks
|
92
92
|
test_files: []
|
93
|
-
has_rdoc:
|