Sha256: 393d62d48d296e185b7c27e725c61d9695d2c8ddd9a38bfc66c8ea85401026c9

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

#!/usr/bin/env ruby

require 'fileutils'
require 'shellwords'
require "bundler/setup"
require "aka"

GEM_BLACKLIST = %w( bundler aka )

target_dir = Dir.pwd

FileUtils.rm_rf "#{target_dir}/vendor/gems"

%x{env BUNDLE_WITHOUT="development:test" bundle show}.split("\n").each do |line|
  if line =~ /^  \* (.*?) \((.*?)\)/
    next if GEM_BLACKLIST.include?($1)
    gem_dir = %x{ bundle show #{$1} }.strip
    FileUtils.mkdir_p "#{target_dir}/vendor/gems"
    %x{ cp -R "#{gem_dir}" "#{target_dir}/vendor/gems" }
  end
end

FileUtils.mkdir_p "#{target_dir}/pkg"

description = Gem::Specification.find_by_name('aka').description

system("rake man:build")

%x{which pkgbuild}

if $?.success?
  package_type = 'osxpkg'
else
  package_type = 'deb'
end

system(%{fpm -s dir -t #{package_type} -n aka -v #{Aka::VERSION} --after-install #{target_dir}/bin/postinstall --after-remove #{target_dir}/bin/postremove --prefix /usr/local/aka --description #{Shellwords.escape(description)} -x .git -x pkg -x man -x test -x features -x tmp -x .bundle -p pkg .})

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hsume2-aka-0.4.2 bin/build
hsume2-aka-0.4.1 bin/build