Sha256: bfeb4bb6d78ef3a516349a9f53da2979aea90a1af1aec0ed9703369e27dc2a3f

Contents?: true

Size: 1.11 KB

Versions: 57

Compression:

Stored size: 1.11 KB

Contents

require 'simp/rake/build/constants'

module Simp; end
module Simp::Rake; end
module Simp::Rake::Build

  class Clean < ::Rake::TaskLib
    include Simp::Rake::Build::Constants

    def initialize( base_dir )
      init_member_vars( base_dir )
      define_tasks
    end

    def define_tasks
      ::CLEAN.include(
        "#{@dist_dir}/*",
        ".discinfo",
        @dvd_dir,
        "#{@build_dir}/SIMP",
        "#{@base_dir}/SIMP_ISO*"
      )

      if $simp6_build_dirs
        ::CLEAN.include($simp6_clean_dirs)
      end

      ::CLOBBER.include(
        @dist_dir,
        "#{@build_dir}/build_keys/dev",
        "#{@build_dir}/yum_data/*/packages"
      )

      # This just abstracts the clean/clobber space in such a way that clobber can actally be used!
      def advanced_clean(type,args)
        fail "Type must be one of 'clean' or 'clobber'" unless ['clean','clobber'].include?(type)

        Rake::Task["pkg:#{type}"].invoke
      end

      task :clobber do |t,args|
        advanced_clean('clobber',args)
      end

      task :clean do |t,args|
        advanced_clean('clean',args)
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
simp-rake-helpers-5.22.1 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.22.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.21.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.20.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.19.2 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.19.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.18.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.17.1 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.17.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.16.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.15.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.14.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.13.2 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.13.1 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.13.0 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.12.7 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.12.6 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.12.5 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.12.4 lib/simp/rake/build/clean.rb
simp-rake-helpers-5.12.3 lib/simp/rake/build/clean.rb