Sha256: 711b68dbf00fbb5bb5e4997914c4aded0b96a7b14e8904265dfca968164c3baf

Contents?: true

Size: 794 Bytes

Versions: 27

Compression:

Stored size: 794 Bytes

Contents

require "git"
require "fileutils"
require "logger"
require "pathname"


class GetCatalog
    def initialize ()
        @log = Logger.new(Canzea::config[:logging_root] + '/plans.log')
    end
    def do(tag = nil)
        catalogLocation = Canzea::config[:catalog_location]
        FileUtils.rm_rf "#{catalogLocation}/catalog"
        FileUtils.mkdir_p "#{catalogLocation}/catalog"
        catalogLocation = Pathname.new(catalogLocation).realpath
        g = Git.clone(Canzea::config[:catalog_git], "catalog", :path => catalogLocation)
        g.branch Canzea::config[:catalog_branch]
        if (tag != nil)
            puts "-- For tag #{tag}"
            g.tag tag
        end
        puts "-- Branch '#{g.branch}' Commit #{g.log[0]}"
        puts "-- Source #{catalogLocation}"
    end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
canzea-0.1.74 lib/commands/get-catalog.rb
canzea-0.1.73 lib/commands/get-catalog.rb
canzea-0.1.72 lib/commands/get-catalog.rb
canzea-0.1.71 lib/commands/get-catalog.rb
canzea-0.1.70 lib/commands/get-catalog.rb
canzea-0.1.68 lib/commands/get-catalog.rb
canzea-0.1.67 lib/commands/get-catalog.rb
canzea-0.1.66 lib/commands/get-catalog.rb
canzea-0.1.64 lib/commands/get-catalog.rb
canzea-0.1.63 lib/commands/get-catalog.rb
canzea-0.1.62 lib/commands/get-catalog.rb
canzea-0.1.61 lib/commands/get-catalog.rb
canzea-0.1.60 lib/commands/get-catalog.rb
canzea-0.1.59 lib/commands/get-catalog.rb
canzea-0.1.58 lib/commands/get-catalog.rb
canzea-0.1.57 lib/commands/get-catalog.rb
canzea-0.1.56 lib/commands/get-catalog.rb
canzea-0.1.55 lib/commands/get-catalog.rb
canzea-0.1.54 lib/commands/get-catalog.rb
canzea-0.1.53 lib/commands/get-catalog.rb