Skip to content

Commit 7961a13

Browse files
Valbcardiff
authored andcommittedJun 25, 2017
[vagrant provisioning] make git call the last one (#4508)
Fix #4507
1 parent bbe0372 commit 7961a13

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
 

‎Vagrantfile

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33

4+
clone_crystal_from_vagrant = lambda do |config|
5+
config.vm.provision :shell, privileged: false, inline: %(
6+
git clone /vagrant crystal
7+
)
8+
end
9+
410
Vagrant.configure("2") do |config|
511
%w(precise trusty xenial).product([32, 64]).each do |dist, bits|
612
box_name = "#{dist}#{bits}"
@@ -15,6 +21,8 @@ Vagrant.configure("2") do |config|
1521
echo 'export LIBRARY_PATH="/opt/crystal/embedded/lib"' > /etc/profile.d/crystal.sh
1622
echo 'export PATH="$PATH:/opt/llvm-3.5.0-1/bin"' >> /etc/profile.d/crystal.sh
1723
)
24+
25+
clone_crystal_from_vagrant.call(c)
1826
end
1927
end
2028

@@ -33,14 +41,12 @@ Vagrant.configure("2") do |config|
3341
c.vm.provision :shell, inline: %(
3442
pkg install -y git gmake pkgconf pcre libunwind clang36 libyaml gmp libevent2
3543
)
44+
45+
clone_crystal_from_vagrant.call(c)
3646
end
3747

3848
config.vm.provider "virtualbox" do |vb|
3949
vb.memory = 4096
4050
vb.cpus = 2
4151
end
42-
43-
config.vm.provision :shell, privileged: false, inline: %(
44-
git clone /vagrant crystal
45-
)
4652
end

0 commit comments

Comments
 (0)
Please sign in to comment.