Sha256: 9da23f9323a6d4f33ff85da231cb6e9ff0e356be7205c956f204a852c5cf1d80

Contents?: true

Size: 633 Bytes

Versions: 5

Compression:

Stored size: 633 Bytes

Contents

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


class GetCatalog
    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], "", :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

5 entries across 5 versions & 1 rubygems

Version Path
canzea-0.1.30 lib/commands/get-catalog.rb
canzea-0.1.29 lib/commands/get-catalog.rb
canzea-0.1.28 lib/commands/get-catalog.rb
canzea-0.1.27 lib/commands/get-catalog.rb
canzea-0.1.26 lib/commands/get-catalog.rb