Sha256: 3ccace69dfb1426bef0b05d5153d4e63aeb51c036a34f0ebb17b1ac20403d948

Contents?: true

Size: 718 Bytes

Versions: 4

Compression:

Stored size: 718 Bytes

Contents

module Minke
  module Commands
    def self.commands config
      {
        :build => {
          :get => [['go','get','-t','-v','-d','./...']],
          :build => [['go','build','-a','-installsuffix','cgo','-ldflags','\'-s\'','-o', "#{config['application_name']}"]],
          :test => [['go','test','./...']]
        },
        :docker => {
          :image => 'golang:latest',
          :env => ['CGO_ENABLED=0'],
          :binds => ["#{ENV['GOPATH']}/src:/go/src"],
          :working_directory => "#{working_directory}"
        }
      }
    end

    def self.working_directory
      dir = File.expand_path('../.')
      gopath = "#{ENV['GOPATH']}"
      new_dir = "/go" + dir.gsub(gopath,'')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
minke-generator-swift-0.1.7 lib/generators/swift/commands.rb
minke-generator-swift-0.1.6 lib/generators/swift/commands.rb
minke-generator-swift-0.1.4 lib/generators/swift/commands.rb
minke-generator-swift-0.1.0 lib/generators/swift/commands.rb