zzdeploy 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,9 +49,9 @@ module Commands
49
49
  end
50
50
 
51
51
  # verify that the chef deploy tag exists
52
- cmd = "git ls-remote --tags git@github.com:zangzing/zz-chef-repo.git refs/tags/#{recipes_deploy_tag} | egrep refs/tags/#{recipes_deploy_tag}"
52
+ cmd = "git ls-remote --tags git@github.com:zangzing/zz-chef-repo.git refs/tags/#{recipes_deploy_tag}^{} refs/tags/#{recipes_deploy_tag} | egrep refs/tags/#{recipes_deploy_tag}"
53
53
  if ZZSharedLib::CL.do_cmd_result(cmd) != 0
54
- raise "Could not find the tag: #{recipes_deploy_tag} in the remote zz-chef-repo repository. Make sure you check in and tag your code, and run chef_upload."
54
+ raise "Could not find the remote tag: #{recipes_deploy_tag} in the remote zz-chef-repo repository. Make sure you check in and tag your code, and run chef_upload."
55
55
  end
56
56
 
57
57
  # tag is good, go ahead and deploy to all the machines in the group
@@ -40,7 +40,7 @@ module Commands
40
40
  deploy_group = amazon.find_deploy_group(group_name)
41
41
 
42
42
  # verify that the tag given is on the remote repo
43
- cmd = "git ls-remote --tags git@github.com:zangzing/zz-chef-repo.git refs/tags/#{recipes_deploy_tag} | egrep refs/tags/#{recipes_deploy_tag}"
43
+ cmd = "git ls-remote --tags git@github.com:zangzing/zz-chef-repo.git refs/tags/#{recipes_deploy_tag}^{} refs/tags/#{recipes_deploy_tag} | egrep refs/tags/#{recipes_deploy_tag}"
44
44
  if ZZSharedLib::CL.do_cmd_result(cmd) != 0
45
45
  raise "Could not find the tag specified in the remote zz-chef-repo repository. Make sure you check in and tag your code."
46
46
  end
@@ -72,9 +72,9 @@ module Commands
72
72
  full_ref = "refs/heads/#{app_deploy_tag}"
73
73
  cmd = "git ls-remote #{gitrepo} #{full_ref} | egrep #{full_ref}"
74
74
  if ZZSharedLib::CL.do_cmd_result(cmd) != 0
75
- # now try to see if it's a tag
75
+ # now try to see if it's a tag - use the ^{} to follow tags to find the matching non tag object (i.e. the proper checkin that we tagged)
76
76
  full_ref = "refs/tags/#{app_deploy_tag}"
77
- cmd = "git ls-remote #{gitrepo} #{full_ref} | egrep #{full_ref}"
77
+ cmd = "git ls-remote #{gitrepo} #{full_ref}^{} #{full_ref} | egrep #{full_ref}"
78
78
  if ZZSharedLib::CL.do_cmd_result(cmd) != 0
79
79
  raise "Could not find the tag or ref: #{app_deploy_tag} in the remote #{gitrepo} repository."
80
80
  end
data/lib/info.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Info
2
2
  def self.version
3
- "0.1.5"
3
+ "0.1.6"
4
4
  end
5
5
  end
data/lib/zz_deploy.rb CHANGED
@@ -7,11 +7,11 @@ require 'right_aws'
7
7
  require 'sdb/active_sdb'
8
8
  require 'json'
9
9
  require 'zzsharedlib'
10
+ require 'info'
10
11
 
11
12
  class ZZDeploy
12
13
  include Subcommands
13
14
 
14
- VERSION = "0.0.4"
15
15
  CMD = "zz"
16
16
 
17
17
  RECIPES_DIR = "/var/chef/cookbooks/zz-chef-repo"
@@ -59,7 +59,7 @@ class ZZDeploy
59
59
  set_amazon_options
60
60
  # global options
61
61
  global_options do |opts|
62
- opts.banner = "Version: #{VERSION} - Usage: #{CMD} [options] [subcommand [options]]"
62
+ opts.banner = "Version: #{Info.version} - Usage: #{CMD} [options] [subcommand [options]]"
63
63
  opts.description = "ZangZing configuration and deploy tool. You must specify a valid sub command."
64
64
  opts.separator ""
65
65
  opts.separator "Global options are:"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 5
9
- version: 0.1.5
8
+ - 6
9
+ version: 0.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Greg Seitz
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-15 00:00:00 -07:00
17
+ date: 2011-08-22 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency