forked from travis-ci/travis-cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39246e0
commit b975c39
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# DESCRIPTION: | ||
|
||
Installs [rebar](https://github.com/basho/rebar.git) for managing Erlang applications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
default[:rebar][:path] = "/usr/local/bin/rebar" | ||
default[:rebar][:user] = "vagrant" | ||
default[:rebar][:group] = "vagrant" | ||
default[:rebar][:release] = "https://github.com/basho/rebar/tarball/master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
maintainer "Ward Bekker" | ||
maintainer_email "ward@equanimity.nl" | ||
license "Apache 2.0" | ||
description "Installs rebar for managing Erlang applications." | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version "1.0.0" | ||
depends "kerl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Cookbook Name:: Rebar | ||
# Recipe:: default | ||
# | ||
# Copyright 2011, Ward Bekker | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
include_recipe('kerl') | ||
|
||
remote_file("/tmp/rebar.tar.gz") do | ||
source node.rebar.release | ||
end | ||
|
||
execute "active an erlang installation with kerl" do | ||
command "otp=`kerl list installations | head -n 1 | cut -f2 -d\" \"` && source \"$otp/activate\"" | ||
end | ||
|
||
execute "install rebar" do | ||
command "tar xvf /tmp/rebar.tar.gz rebar && cd /tmp/rebar && ./bootstrap && chmod +x rebar && sudo cp rebar #{node.rebar.path}" | ||
end |