Sha256: 9f4e7206f1b61e3e0b2307acd6841d69018fe7baa0ffd329204539a1cbd3a56e

Contents?: true

Size: 1.46 KB

Versions: 3

Compression:

Stored size: 1.46 KB

Contents

namespace :build do
  desc "Build mac binary"
  task :mac do
    Dir.chdir("./libxlsxwriter") do
      system("make clean && make")
      system('cp lib/libxlsxwriter.dylib ../binaries/libxlsxwriter-darwin.dylib')
    end
  end

  desc "Build linux (libc) binary"
  task :linux do
    system("docker build . -f build_centos_linux.docker -t fast_excel_centos")
    system("docker run -t fast_excel_centos readelf -d lib/libxlsxwriter.so")
    last_container_id = `docker ps -a | grep fast_excel_centos | head -1 | awk '{print $1;}'`.strip
    system("docker cp #{last_container_id}:/srv/libxlsxwriter/lib/libxlsxwriter.so ./binaries/libxlsxwriter-glibc.so")
    system("docker rm #{last_container_id}")
  end

  desc "Build linux (musl) binary"
  task :linux_musl do
    system("docker build . -f build_alpine_linux.docker -t fast_excel_alpine")
    system("docker run -t fast_excel_alpine readelf -d lib/libxlsxwriter.so")
    last_container_id = `docker ps -a | grep fast_excel_alpine | head -1 | awk '{print $1;}'`.strip
    system("docker cp #{last_container_id}:/srv/libxlsxwriter/lib/libxlsxwriter.so ./binaries/libxlsxwriter-alpine.so")
    system("docker rm #{last_container_id}")
  end
end

task :sync do
  require 'fileutils'
  FileUtils.rm_rf("./libxlsxwriter")
  system("git clone --depth 10 git@github.com:Paxa/libxlsxwriter.git")
  Dir.chdir("./libxlsxwriter") do
    system("git show --pretty='format:%cd %h' --date=iso --quiet > version.txt")
    FileUtils.rm_rf("./.git")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fast_excel-0.1.7 Rakefile
fast_excel-0.1.6 Rakefile
fast_excel-0.1.5 Rakefile