Sha256: e32cea9f2692196bec140fd79e4299fd3d5c32c63c8ae13001f711a3678ce7b2

Contents?: true

Size: 857 Bytes

Versions: 7

Compression:

Stored size: 857 Bytes

Contents

require_relative 'has_execute_command'

module Bake
  module Blocks

    class CommandLine
      include HasExecuteCommand

      def initialize(config)
        @config = config # Bake::Metamodel::CommandLine
        @commandLine = config.name.kind_of?(Array) ? config.name.join(' ') : config.name
        @projectDir = config.get_project_dir
      end

      def run
        return true if Bake.options.linkOnly
        return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
      end

      def execute
        return run()
      end

      def startupStep
        return run()
      end

      def exitStep
        return run()
      end

      def cleanStep
        return run()
      end

      def clean
        # nothing to do here
        return true
      end

    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bake-toolkit-2.72.0 lib/blocks/commandLine.rb
bake-toolkit-2.71.0 lib/blocks/commandLine.rb
bake-toolkit-2.70.1 lib/blocks/commandLine.rb
bake-toolkit-2.70.0 lib/blocks/commandLine.rb
bake-toolkit-2.69.0 lib/blocks/commandLine.rb
bake-toolkit-2.68.1 lib/blocks/commandLine.rb
bake-toolkit-2.68.0 lib/blocks/commandLine.rb