Sha256: 15fe2718943e66d49d8cd7c2ce944552e4d78b8d77ccce644d357641333669b6

Contents?: true

Size: 625 Bytes

Versions: 21

Compression:

Stored size: 625 Bytes

Contents

require "zip/zip"

task :pack do
  exclude = [
    'tmp/',
    'config/services/',
    'config/database.yml',
    'test/',
    'spec/',
    'doc/'
  ]

  builds   = Pathname.new("tmp/builds/")
  zip_file = builds.join(File.read(Application.root.join "VERSION") + '.zip')

  FileUtils.mkdir_p builds
  File.delete zip_file if File.exist? zip_file

  Zip::ZipFile.open(zip_file, Zip::ZipFile::CREATE) do |zipfile|
    `git ls-files`.split($/).each do |filename|
      next unless File.file?(filename)
      next if exclude.map{|x| filename.start_with?(x)}.include?(true)

      zipfile.add(filename, filename)
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
smartkiosk-client-0.0.26 lib/tasks/pack.rb
smartkiosk-client-0.0.25 lib/tasks/pack.rb
smartkiosk-client-0.0.24 lib/tasks/pack.rb
smartkiosk-client-0.0.23 lib/tasks/pack.rb
smartkiosk-client-0.0.22 lib/tasks/pack.rb
smartkiosk-client-0.0.21 lib/tasks/pack.rb
smartkiosk-client-0.0.20 lib/tasks/pack.rb
smartkiosk-client-0.0.19 lib/tasks/pack.rb
smartkiosk-client-0.0.18 lib/tasks/pack.rb
smartkiosk-client-0.0.17 lib/tasks/pack.rb
smartkiosk-client-0.0.16 lib/tasks/pack.rb
smartkiosk-client-0.0.10 lib/tasks/pack.rb
smartkiosk-client-0.0.9 lib/tasks/pack.rb
smartkiosk-client-0.0.8 lib/tasks/pack.rb
smartkiosk-client-0.0.7 lib/tasks/pack.rb
smartkiosk-client-0.0.6 lib/tasks/pack.rb
smartkiosk-client-0.0.5 lib/tasks/pack.rb
smartkiosk-client-0.0.4 lib/tasks/pack.rb
smartkiosk-client-0.0.3 lib/tasks/pack.rb
smartkiosk-client-0.0.2 lib/tasks/pack.rb