bricks-deploy 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +2 -2
- data/lib/bricks_deploy.rb +7 -2
- 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: 206959cc48161d213b59128c6b39336a9ab736dc
|
4
|
+
data.tar.gz: 3980bf1ffd7ce1239acf32e6b3fd92651aae89dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8b4de09be23a91e4f6916ad6f451cee70728036ab9318b5eb1c46cd6c84062d1b20ac65423a9979c8ea1407ae8efa3cbe28da7c3799318972a5447d5730128b
|
7
|
+
data.tar.gz: 3e7b7f2efec4b32085b194e43f8e39c97f4a0702c3180a5c2b8cfd0883d9eb2f10d16396a544694d554a4099459ea27e937c9cd6a4a70f9e7403fb9899307a4b
|
data/README.markdown
CHANGED
data/lib/bricks_deploy.rb
CHANGED
@@ -22,6 +22,8 @@ class BricksDeploy < Thor
|
|
22
22
|
desc "setup", "Create the remote git repository and install push hooks for it"
|
23
23
|
method_option :shared, :aliases => '-g', :type => :boolean, :default => false
|
24
24
|
method_option :sudo, :aliases => '-s', :type => :boolean, :default => false
|
25
|
+
method_option :stage, :aliases => '--stage', :type => :string, :default => 'dev'
|
26
|
+
method_option :color, :aliases => '--color', :type => :string, :default => 'twentysteps'
|
25
27
|
def setup
|
26
28
|
sudo = options.sudo? ? "#{sudo_cmd} " : ''
|
27
29
|
|
@@ -39,6 +41,9 @@ class BricksDeploy < Thor
|
|
39
41
|
cmd << "sed -i'' -e 's/master/#{branch}/' .git/HEAD" unless branch == 'master'
|
40
42
|
cmd << "git config --bool receive.denyNonFastForwards false" if options.shared?
|
41
43
|
cmd << "git config receive.denyCurrentBranch ignore"
|
44
|
+
cmd << "mkdir deploy"
|
45
|
+
cmd << "echo #{options.stage} > deploy/stage"
|
46
|
+
cmd << "echo #{options.color} > deploy/color"
|
42
47
|
end
|
43
48
|
|
44
49
|
invoke :hooks
|
@@ -52,7 +57,7 @@ class BricksDeploy < Thor
|
|
52
57
|
scp_upload "#{hooks_dir}/post-receive.sh" => "#{remote_dir}/post-receive"
|
53
58
|
run "chmod +x #{remote_dir}/post-receive"
|
54
59
|
end
|
55
|
-
|
60
|
+
|
56
61
|
desc "restart", "Restarts the application on the server"
|
57
62
|
def restart
|
58
63
|
run "cd #{deploy_to} && deploy/restart 2>&1 | tee -a log/deploy.log"
|
@@ -101,4 +106,4 @@ class BricksDeploy < Thor
|
|
101
106
|
all
|
102
107
|
}
|
103
108
|
end
|
104
|
-
end
|
109
|
+
end
|