Sha256: 698d9c3af7c1faadde64ad20a55d93a03683bb9f63c24acf28385475a20a525c

Contents?: true

Size: 938 Bytes

Versions: 1

Compression:

Stored size: 938 Bytes

Contents

module Minke
  module Commands
    class Swift
      def commands config
        {
          :build => {
            :get => [
              ['swift', 'build', '--fetch'],
              # ['bash','-c', "find /src/Packages/ -type d -name Tests -exec echo {} && rm -rf {} \\;"]
              ['bash','-c', "find /src/Packages/ -type d -name Tests | xargs rm -rf"]
            ],
            :build => [
              ['rm', '-rf', '.build'],
              ['swift', 'build', '-Xcc', '-fblocks']
            ],
            :test => [['swift', 'test']],
          },
          :docker => {
            :image => 'ibmcom/kitura-ubuntu:latest',
            :binds => ["#{source_directory}:/src"],
            :working_directory => "/src"
          }
        }
      end

      def source_directory
        Dir.pwd if File.exists?('Package.swift')
        File.expand_path('../.') if File.exists?('../Package.swift')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minke-0.15.0 lib/minke/commands/swift.rb