Skip to content

Commit

Permalink
SBT cookbook overhaul
Browse files Browse the repository at this point in the history
 * Upgrade to 0.11.3 that won't use scala-tools.org (which has been recently shut down)
 * Do not keep .deb in the cookbook itself, download it using remote_file instead
 * Add Scala 2.9.2 to the list of known supported versions we pre-download dependencies for
  • Loading branch information
michaelklishin committed May 7, 2012
1 parent 5c554d6 commit 0ad06aa
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
14 changes: 10 additions & 4 deletions ci_environment/sbt/attributes/default.rb
@@ -1,4 +1,10 @@
# 5 minutes to install sbt's own dependencies under ~/.sbt/boot. MK.
default[:sbt][:boot][:timeout] = 300

default[:sbt][:scala][:versions] = ["2.9.1", "2.9.0-1", "2.8.2", "2.8.1"]
default[:sbt] = {
:version => "0.11.3",
:boot => {
# 5 minutes to install sbt's own dependencies under ~/.sbt/boot. MK.
:timeout => 300
},
:scala => {
:versions => ["2.9.2", "2.9.1", "2.9.0-1", "2.8.2", "2.8.1"]
}
}
Binary file removed ci_environment/sbt/files/default/sbt-0.11.2.deb
Binary file not shown.
2 changes: 1 addition & 1 deletion ci_environment/sbt/metadata.json
Expand Up @@ -18,7 +18,7 @@
"description": "Installs SBT (Simple Build Tool) 0.11.2 for building Scala and Java projects.",
"groupings": {
},
"version": "1.1.1",
"version": "1.1.2",
"recommendations": {
},
"name": "sbt",
Expand Down
4 changes: 2 additions & 2 deletions ci_environment/sbt/metadata.rb
@@ -1,8 +1,8 @@
maintainer "Michael S. Klishin"
maintainer_email "michael.s.klishin@gmail.com"
license "Apache 2.0"
description "Installs SBT (Simple Build Tool) 0.11.2 for building Scala and Java projects."
description "Installs SBT (Simple Build Tool) 0.11.x for building Scala and Java projects."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.1.1"
version "1.1.2"
platforms
depends "java"
23 changes: 17 additions & 6 deletions ci_environment/sbt/recipes/default.rb
Expand Up @@ -21,23 +21,34 @@

require "tmpdir"

include_recipe "libssl::098"

# This recipe uses homegrown .deb package built with sbt-installer-ubuntizer scripts
# originally developed by Przemek Pokrywka.
# See https://github.com/michaelklishin/sbt-installer-ubuntizer

tmp = Dir.tmpdir
case node[:platform]
when "debian", "ubuntu"
# home-made .deb package tweaking with sbt-installer-ubuntizer scripts
# see https://github.com/przemek-pokrywka/sbt-installer-ubuntizer
%w(sbt-0.11.2.deb).each do |deb|
["sbt-#{node.sbt.version}.deb"].each do |deb|
path = File.join(tmp, deb)

cookbook_file(path) do
owner node.travis_build_environment.user
group node.travis_build_environment.group
remote_file(path) do
v = node.sbt.version

owner node.travis_build_environment.user
group node.travis_build_environment.group
source "http://files.travis-ci.org/packages/deb/sbt/#{deb}"

not_if "which sbt"
end

package(deb) do
action :install
source path
provider Chef::Provider::Package::Dpkg

not_if "which sbt"
end
end # each
end # case
Expand Down

0 comments on commit 0ad06aa

Please sign in to comment.