github.com/nycdavid/zeus@v0.0.0-20201208104106-9ba439429e03/rubygem/Rakefile (about)

     1  #!/usr/bin/env rake
     2  require "bundler/gem_tasks"
     3  require 'fileutils'
     4  require 'pathname'
     5  
     6  ROOT_PATH = Pathname.new(File.expand_path("../../", __FILE__))
     7  RUBYGEM_PATH = Pathname.new(File.expand_path("../", __FILE__))
     8  
     9  task build: [:manifest]
    10  task default: :build
    11  
    12  task :manifest do
    13    files = `find . -type f | sed 's|^\./||'`.lines.map(&:chomp)
    14    exceptions = [
    15      /.gitignore$/,
    16      /^MANIFEST$/,
    17      /^pkg\//,
    18    ]
    19    files.reject! { |f| exceptions.any? {|ex| f =~ ex }}
    20    File.open('MANIFEST', 'w') {|f| f.puts files.join("\n") }
    21  end
    22