ops_worker 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ops_worker/app.rb +5 -3
- data/lib/ops_worker/cli.rb +2 -2
- data/lib/ops_worker/version.rb +1 -1
- metadata +1 -1
data/lib/ops_worker/app.rb
CHANGED
@@ -43,14 +43,16 @@ module OpsWorker
|
|
43
43
|
def deploy(revision = nil)
|
44
44
|
OpsWorker.logger.info {"Deploying app #{@name} from #{revision || @revision}"}
|
45
45
|
|
46
|
-
|
47
|
-
|
46
|
+
existing_revision = @revision.dup()
|
47
|
+
changing_revisions = revision && revision != existing_revision
|
48
|
+
|
49
|
+
if changing_revisions
|
48
50
|
update_revision(revision)
|
49
51
|
end
|
50
52
|
|
51
53
|
deployment_status = create_deployment(:deploy)
|
52
54
|
|
53
|
-
if
|
55
|
+
if changing_revisions
|
54
56
|
update_revision(existing_revision)
|
55
57
|
end
|
56
58
|
|
data/lib/ops_worker/cli.rb
CHANGED
@@ -19,7 +19,7 @@ module OpsWorker
|
|
19
19
|
case command
|
20
20
|
when "deploy"
|
21
21
|
command_opts = Trollop::options do
|
22
|
-
opt :branch, :type => :string
|
22
|
+
opt :branch, "Branch", :type => :string
|
23
23
|
end
|
24
24
|
app.deploy(command_opts[:branch])
|
25
25
|
when "rollback"
|
@@ -28,7 +28,7 @@ module OpsWorker
|
|
28
28
|
app.update_cookbooks()
|
29
29
|
when "execute_recipe"
|
30
30
|
command_opts = Trollop::options do
|
31
|
-
opt :recipe_name, :type => :string, :required => true
|
31
|
+
opt :recipe_name, "Recipe name", :type => :string, :required => true
|
32
32
|
end
|
33
33
|
app.execute_recipes([command_opts[:recipe_name]])
|
34
34
|
else
|
data/lib/ops_worker/version.rb
CHANGED