Git Product home page Git Product logo

buildtasks's Introduction

BuildTasks

Build Status

Rake tasks to build Debian packages with git-buildpackage and fpm-cookery.

Installation

Add this line to your application's Gemfile:

gem 'buildtasks'

And then execute:

$ bundle

Or install it yourself as:

$ gem install buildtasks

Usage

Require the buildtasks gem in a Rakefile and call BuildTasks::Tool.define, where "Tool" is the name of the build tool you want to use (see below for a list of options you can pass to .define).

This will create two Rake tasks:

  • build -- used to build Debian package(s)
  • publish -- used to copy built packages to directory specified by PUBLISH_DIR environment variable

Invoke the build task to first build the packages, e.g., inside a Vagrant machine or Docker container. Afterwards, run the publish task to copy the resulting packages to a known location, e.g., your host system via a shared volume.

fpm-cookery

To build packages with fpm-cookery, create a Rakefile with this content:

require "buildtasks"

BuildTasks::FPMCookery.define do
  recipe              "recipe.rb" # name of recipe file (optional)
  fpm_cookery_version "0.25.0"    # version of fpm-cookery gem to use (optional)
  fpm_version         "1.3.3"     # version of fpm gem to use (optional)
end

In case you don't need to configure any attributes:

require "buildtasks"

BuildTasks::FPMCookery.define

Note that fpm-cookery will automatically install dependencies specified by the build_depends and depends attributes in recipe.rb before building.

git-buildpackage

To build packages with git-buildpackage, create a Rakefile with this content:

require "buildtasks"

BuildTasks::GitBuildpackage.define do
  name        "thrift" # project name
  version     "0.9.1"  # git ref to build
  source      "https://github.com/apache/thrift" # git repository to clone
  apply_patch "patches/THRIFT-2211.patch"        # patch to apply before building (optional)
end

Note that all build dependencies from debian/control will be automatically installed before building.

Extending Rake tasks

.define generates ordinary Rake tasks, which you can extend.

For example, here's how to download some file before fpm-cookery starts building:

require "buildtasks"

BuildTasks::FPMCookery.define

task :download do
  sh "curl ..."
end
task :build => :download

License and Authors

Author:: Mathias Lafeldt ([email protected])

Copyright:: 2014-2015, Jimdo GmbH

Licensed under the Apache 2.0 license. See LICENSE for details.

Contributing

  1. Fork this repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.