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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Albacore is a suite of tools for the professional .Net or mono developer that make their life easier.
gem install albacore
.appspec
file lets you construct IIS Site-packages with
Chocolatey on Windows, Topshelf services with Chocolatey on Windows and RPM
and DEB services on Linux with three lines of code - become the DevOps GOD of
your company!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.
gem install albacore
albacore init
Now you have the initial setup and can run bundle exec rake
. (nokogiri error?) But please read
below:
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.
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.
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.
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
bundle exec rspec spec
to verify test failsmaster
Document your code with YARD as you're writing it: it's much easier to write the documentation together with the code than afterwards.
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.