Sha256: 940dd65200568f98a87ed313dd83f66440e723a7e600342e5ed4fb5d9a88b866

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 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
        FileUtils.mkdir_p catalogLocation
        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

1 entries across 1 versions & 1 rubygems

Version Path
canzea-0.1.45 lib/commands/get-catalog.rb