canzea 0.1.172 → 0.1.173

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d3a9a17121a91c110f0924dee4f92c30da78386
4
- data.tar.gz: 514fa3911597cb8c824285f2df16b37d7d11153e
3
+ metadata.gz: ec88a18306083c65200833f06ce240837b8cfa8c
4
+ data.tar.gz: b928be1c4dd7b84679e947abc44c177a340951fc
5
5
  SHA512:
6
- metadata.gz: 617717108dc1ef3810e4d1c1cf6b391db3ccdc8f4228f137f28d0818f3c61ea20ad3a028623ebb706259b153033477216e12ebff87d84dc32228f286d9edafb4
7
- data.tar.gz: bf5cfce62a2dc0c8d7f2fe6b14fd5b47655550c89fd7afe4efc3a2a2308c31d373ffee1fc26de0bf5fd23f9c53ece162b4d889fcac85442be4ad1a02d59d5652
6
+ metadata.gz: 77394dad1c1eb37d611b54534ea7c671cd39914149452fd32d070d413e58cbbdde0dc3a5fafa19fc08094f2771fe57088eb163731c8fd69c192ccbf14f327c71
7
+ data.tar.gz: 4c324ddc283e937930f4420a805f3fbb3605f79ac5a525e3dc32eaca100a0e3026502583a49168f4ab5cec355a895abc1fcaa1be070e6afcc1565e73f4ffd159
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.172"
2
+ VERSION = "0.1.173"
3
3
  end
data/lib/canzea.rb CHANGED
@@ -57,6 +57,7 @@ module Canzea
57
57
  # flag nil, :enable, 'Enable the service'
58
58
  flag nil, :test, 'Run as a test'
59
59
  flag nil, :reset, 'Refresh catalog to latest'
60
+ flag nil, :checkout, 'Checkout catalog to latest'
60
61
  flag nil, :fv, 'Show version and the catalog version'
61
62
  flag nil, :config_git_commit, 'Manage configuration files in git'
62
63
 
@@ -116,6 +117,10 @@ module Canzea
116
117
  GetCatalog.new.do(opts.fetch(:catalogTag, nil));
117
118
  end
118
119
 
120
+ if (opts[:checkout])
121
+ GetCatalog.new.checkout(opts.fetch(:catalogTag, nil));
122
+ end
123
+
119
124
  GetCatalog.new.state
120
125
 
121
126
  if (opts[:fv])
@@ -8,6 +8,7 @@ class GetCatalog
8
8
  def initialize ()
9
9
  @log = Logger.new(Canzea::config[:logging_root] + '/plans.log')
10
10
  end
11
+
11
12
  def do(tag = nil)
12
13
  catalogLocation = Canzea::config[:catalog_location]
13
14
  FileUtils.rm_rf "#{catalogLocation}"
@@ -25,6 +26,21 @@ class GetCatalog
25
26
  puts "-- (RESET) Source #{catalogLocation}/catalog"
26
27
  end
27
28
 
29
+ def checkout(tag = nil)
30
+ catalogLocation = Canzea::config[:catalog_location]
31
+ catalogLocation = Pathname.new(catalogLocation).parent().realpath
32
+ g = Git.open(Canzea::config[:catalog_location])
33
+ if (tag != nil)
34
+ puts "-- (RESET) For tag #{tag}"
35
+ g.checkout(tag)
36
+ else
37
+ g.checkout(g.branch(Canzea::config[:catalog_branch]))
38
+ end
39
+ branch = g.current_branch
40
+ puts "-- (RESET) Branch '#{branch}' Commit #{g.log[0]}"
41
+ puts "-- (RESET) Source #{catalogLocation}/catalog"
42
+ end
43
+
28
44
  def state()
29
45
  g = Git.open(Canzea::config[:catalog_location])
30
46
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canzea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.172
4
+ version: 0.1.173
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies