forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbzr-builder.rb
41 lines (32 loc) · 1.07 KB
/
bzr-builder.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class BzrBuilder < Formula
desc "Bazaar plugin to construct a branch based on a recipe"
homepage "https://launchpad.net/bzr-builder"
url "https://launchpad.net/bzr-builder/trunk/0.7.3/+download/bzr-builder-0.7.3.tar.gz"
sha256 "9f8a078eafd6700ccbefa4e7e3f7df3240e15a2003c9538135c4be945ac90c91"
bottle :unneeded
depends_on "bazaar"
def install
(share/"bazaar/plugins/builder").install Dir["*"]
end
test do
system "bzr", "whoami", "Homebrew"
system "bzr", "init-repo", "repo"
cd "repo" do
system "bzr", "init", "trunk"
cd "trunk" do
touch "readme.txt"
system "bzr", "add"
system "bzr", "commit", "-m", "initial import"
end
(testpath/"repo/my.recipe").write <<~EOS
# bzr-builder format 0.3 deb-version 1.0+{revno}-{revno:packaging}
trunk
EOS
system "bzr", "build", "my.recipe", "branch"
cd "branch" do
assert_predicate testpath/"repo/branch/bzr-builder.manifest", :exist?
assert_predicate testpath/"repo/branch/readme.txt", :exist?
end
end
end
end