Sha256: 4551eab3d89e1bafd3009b29db68ad9b68797ed8f2897127591de6e25988c7bc

Contents?: true

Size: 1.99 KB

Versions: 8

Compression:

Stored size: 1.99 KB

Contents

#
# Copyright:: Copyright (c) 2013 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'omnibus/cli/base'

module Omnibus
  module CLI
    class Build < Base

      namespace :build

      class_option :path,
        :aliases => [:p],
        :type => :string,
        :default => Dir.pwd,
        :desc => "Path to the Omnibus project root."

      method_option :timestamp,
        :aliases => [:t],
        :type => :boolean,
        :default => true,
        :desc => "Append timestamp information to the version identifier? Add a timestamp for build versions; leave it off for release and pre-release versions"
      desc "project PROJECT", "Build the given Omnibus project"
      def project(project_name)
        project = load_project!(project_name)
        project_task_name = "projects:#{project.name}"

        unless options[:timestamp]
          say("I won't append a timestamp to the version identifier.", :yellow)
        end
        say("Building #{project.name} #{project.build_version}", :green)

        Rake::Task[project_task_name].invoke
      end

      desc "software PROJECT SOFTWARE", "Build the given software component"
      def software(project_name, software_name)
        project = load_project!(project_name)
        software_task_name = "projects:#{project.name}:software:#{software_name}"

        say("Building #{software_name} for #{project.name} project", :green)

        Rake::Task[software_task_name].invoke
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
omnibus-1.3.0 lib/omnibus/cli/build.rb
omnibus-sonian-1.2.0.1 lib/omnibus/cli/build.rb
omnibus-1.2.0 lib/omnibus/cli/build.rb
omnibus-1.1.1 lib/omnibus/cli/build.rb
omnibus-1.1.0 lib/omnibus/cli/build.rb
omnibus-1.0.4 lib/omnibus/cli/build.rb
omnibus-1.0.3 lib/omnibus/cli/build.rb
omnibus-1.0.2 lib/omnibus/cli/build.rb