Skip to content

Commit

Permalink
dub: remove custom download strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Dec 17, 2014
1 parent 357526b commit fa6cb26
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Formula/dub.rb
@@ -1,20 +1,11 @@
require "formula"

# dub generates version information from git, when building.
# To not break this, we provide a custom download strategy.
class DubHeadDownloadStrategy < GitDownloadStrategy
def stage
cached_location.cd { reset }
quiet_safe_system "git", "clone", cached_location, "."
end
end

class Dub < Formula
homepage "http://code.dlang.org/about"
url "https://github.com/D-Programming-Language/dub/archive/v0.9.22.tar.gz"
sha1 "9a7b7c838f1241de209473c09a194d355279457b"

head "https://github.com/D-Programming-Language/dub.git", :using => DubHeadDownloadStrategy, :shallow => false
head "https://github.com/D-Programming-Language/dub.git", :shallow => false

devel do
url "https://github.com/D-Programming-Language/dub/archive/v0.9.22-rc.1.tar.gz"
Expand All @@ -26,6 +17,7 @@ class Dub < Formula
depends_on "dmd" => :build

def install
ENV["GIT_DIR"] = cached_download/".git"
system "./build.sh"
bin.install "bin/dub"
end
Expand Down

0 comments on commit fa6cb26

Please sign in to comment.