Sha256: fe5b59b1cfdc618dd182b09f4482fe82cbbd58986ea7de668eb222537e0f3570

Contents?: true

Size: 1010 Bytes

Versions: 9

Compression:

Stored size: 1010 Bytes

Contents

require 'mattock/tasklib'

module Corundum
  class VersionControl < Mattock::TaskLib
    default_namespace :version_control

    required_fields(:gemspec, :build_finished_file, :gemspec_files, :tag)

    def default_configuration(toolkit)
      self.gemspec =  toolkit.gemspec
      self.build_finished_file =  toolkit.finished_files.build
      self.gemspec_files = toolkit.files.code + toolkit.files.test
      self.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

9 entries across 9 versions & 1 rubygems

Version Path
corundum-0.0.24 lib/corundum/version_control.rb
corundum-0.0.23 lib/corundum/version_control.rb
corundum-0.0.22 lib/corundum/version_control.rb
corundum-0.0.20 lib/corundum/version_control.rb
corundum-0.0.19 lib/corundum/version_control.rb
corundum-0.0.18 lib/corundum/version_control.rb
corundum-0.0.17 lib/corundum/version_control.rb
corundum-0.0.16 lib/corundum/version_control.rb
corundum-0.0.15 lib/corundum/version_control.rb