Albacore/albacore

Name: albacore

Owner: Albacore

Description: Albacore is a professional quality suite of Rake tasks for building .NET or Mono based systems.

Created: 2012-08-23 12:47:31.0

Updated: 2017-12-29 08:47:21.0

Pushed: 2017-12-29 13:51:01.0

Homepage: www.albacorebuild.net

Size: 27419

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Albacore v2.0

Gitter Version Build Status Gittip Code Climate

Albacore is a suite of tools for the professional .Net or mono developer that make their life easier.

gem install albacore
Main Features

The wiki is the main reference for the above task types, but there's also very extensive documentation in the code, as well as hundreds of unit tests written in a easy-to-read rspec syntax.

Quickstart TLDR; SHOW ME THE CODE!
gem install albacore
albacore init

Now you have the initial setup and can run bundle exec rake. (nokogiri error?) But please read below:

Getting Started

Follow along for a quick intro, but if on Windows, see the section 'Installing Ruby' first. Albacore works on both Ruby 1.9.3 and 2.x.

First create Gemfile with these contents:

source 'https://rubygems.org'
gem 'albacore', '~> 2.0.0'

When setting up your build you need to ensure it is reproducible. Bundler allows you to lock down the few gems that Albacore depend on to their specific versions, ensuring that your peers can re-run the same build script you just built and that it works well on your continous integration server.

Now you can bundle the dependencies, effectively freezing all gem dependencies that your build depends on.

bundle
git add Gemfile*
git commit -m 'Installed Albacore'

Now you are ready to continue reading below for your first Rakefile.

Installing Ruby on Windows

First install Ruby 32 bits from http://rubyinstaller.org/downloads/ - e.g. v2.1.5 32-bits which is the latest version, at time of writing.

Second, install Ruby DevKit, or you won't be able to install nokogiri. Download it lower down on the same page, open a console:

DevKit
 dk.rb init
 dk.rb install

Now close that console and open a new console, and run:

gem install bundler

This gives you a working ruby installation. Continue below with your first Rakefile.

You can also try chocolatey ruby and ruby2.devkit packages.

Installing Ruby on OS X
 install rbenv ruby-build
v install 2.2.0
install bundler

Done. Ensure brew doctor is clean enough and that ruby --version outputs the expected version.

Creating Your First Rakefile

In order to build your project, you need to create a Rakefile, with contents like these:

ire 'bundler/setup'

ire 'albacore'
ire 'albacore/tasks/versionizer'
ire 'albacore/ext/teamcity'

core::Tasks::Versionizer.new :versioning

 'Perform fast build (warn: doesn\'t d/l deps)'
d :quick_build do |b|
logging = 'detailed'
sln     = 'src/MyProj.sln'


 'restore all nugets as per the packages.config files'
ts_restore :restore do |p|
out = 'src/packages'
exe = 'tools/NuGet.exe'


 'Perform full build'
d :build => [:versioning, :restore] do |b|
sln = 'src/MyProj.sln'
alt: b.file = 'src/MyProj.sln'


ctory 'build/pkg'

 'package nugets - finds all projects and package them'
ts_pack :create_nugets => ['build/pkg', :versioning, :build] do |p|
files   = FileList['src/**/*.{csproj,fsproj,nuspec}'].
exclude(/Tests/)
out     = 'build/pkg'
exe     = 'tools/NuGet.exe'
with_metadata do |m|
m.description = 'A cool nuget'
m.authors = 'Henrik'
m.version = ENV['NUGET_VERSION']
d
with_package do |p|
p.add_file 'file/relative/to/proj', 'lib/net40'
d


 :default => :create_nugets

You can now run:

bundle exec rake

You can continue reading about the available task-types in the wiki.

If you're upgrading from v1.0, there's an article there for you

Contributing
  1. Create a feature branch with your change: a. With unit test b. With feature
  2. Send a PR with that feature branch to this branch a. Make sure TravisCI is OK with it b. Describe your PR in English.
Writing Code
  1. Add a rspec spec in specs/
  2. Run bundle exec rspec spec to verify test fails
  3. Implement feature you want
  4. Run the tests again, have them pass
  5. Make a PR from your feature branch against master

Document your code with YARD as you're writing it: it's much easier to write the documentation together with the code than afterwards.

Error
CentOS 6/7

If you get a problem installing nokogiri, you have two choices: yum install epel-release && yum install ruby rubygems-nokogiri && gem install albacore which loads nokogiri from epel, or you could do: yum install ruby gcc ruby-devel zlib-devel libxslt-devel libxml2-devel && gem install nokogiri which lets rubygems compile nokogiri.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.