ops_worker 0.0.4 → 0.0.5

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.
@@ -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
- if revision
47
- existing_revision = @revision.dup()
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 revision
55
+ if changing_revisions
54
56
  update_revision(existing_revision)
55
57
  end
56
58
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module OpsWorker
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: