Sha256: 18db11ce2cee8eff26b4fc4442bbe6c7f4f4b5f5146395eb2f5ea6cf370b3ef2

Contents?: true

Size: 961 Bytes

Versions: 2

Compression:

Stored size: 961 Bytes

Contents

require 'corundum/tasklib'

module Corundum
  class VersionControl < TaskLib
    def default_namespace
      :version_control
    end

    def default_configuration(toolkit)
      setting(:gemspec,  toolkit.gemspec)
      setting(:build_finished_file,  toolkit.finished_files.build)
      setting(:gemspec_files, toolkit.files.code + toolkit.files.test)
      setting(:tag,  toolkit.gemspec.version.to_s)
    end

    def define
      in_namespace do
        task :not_tagged
        task :gemspec_files_added
        task :workspace_committed
        task :is_checked_in => %w{gemspec_files_added workspace_committed}
        task :tag
        task :check_in => :tag
      end

      task :preflight => in_namespace(:not_tagged)
      task :build => in_namespace(:is_checked_in)
      in_namespace(:tag, :check_in).each do |taskname|
        task taskname => build_finished_file
      end
      task :release => in_namespace(:tag, :check_in)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
corundum-0.0.6 lib/corundum/version_control.rb
corundum-0.0.5 lib/corundum/version_control.rb