Sha256: 714a785fadb67f5f92e02536d342367b5f99652490371181f313ef34e85879ae

Contents?: true

Size: 795 Bytes

Versions: 15

Compression:

Stored size: 795 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).parent().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}/catalog"
    end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
canzea-0.1.91 lib/commands/get-catalog.rb
canzea-0.1.90 lib/commands/get-catalog.rb
canzea-0.1.89 lib/commands/get-catalog.rb
canzea-0.1.88 lib/commands/get-catalog.rb
canzea-0.1.87 lib/commands/get-catalog.rb
canzea-0.1.86 lib/commands/get-catalog.rb
canzea-0.1.85 lib/commands/get-catalog.rb
canzea-0.1.84 lib/commands/get-catalog.rb
canzea-0.1.83 lib/commands/get-catalog.rb
canzea-0.1.82 lib/commands/get-catalog.rb
canzea-0.1.81 lib/commands/get-catalog.rb
canzea-0.1.80 lib/commands/get-catalog.rb
canzea-0.1.78 lib/commands/get-catalog.rb
canzea-0.1.77 lib/commands/get-catalog.rb
canzea-0.1.76 lib/commands/get-catalog.rb