Break build preparation out from the Vagrantfile
As we will not always use vagrant for building images, break the preparation bits into scripts per distro.
This commit is contained in:
parent
233e514861
commit
aaa16b8b6d
15
Vagrantfile
vendored
15
Vagrantfile
vendored
@ -9,8 +9,19 @@ Vagrant.configure('2') do |config|
|
|||||||
config.vm.box_url = GIFTWRAP_BUILDBOX_URL
|
config.vm.box_url = GIFTWRAP_BUILDBOX_URL
|
||||||
|
|
||||||
config.vm.provision 'shell', inline: <<-EOF
|
config.vm.provision 'shell', inline: <<-EOF
|
||||||
apt-get update
|
if [ -f /etc/lsb-release ]; then
|
||||||
apt-get install -y build-essential ruby1.9.1-dev git python-pip python-dev python-virtualenv libxml2-dev libxslt-dev libffi-dev libmysqlclient-dev libpq-dev libsqlite3-dev
|
. /etc/lsb-release
|
||||||
|
OS=$DISTRIB_ID
|
||||||
|
elif [ -f /etc/debian_version ]; then
|
||||||
|
OS=Debian
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
OS=RedHat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$OS" == "Debian" ] || [ "$OS" == "Ubuntu" ]; then
|
||||||
|
/vagrant/scripts/prepare_debian.sh
|
||||||
|
fi
|
||||||
|
|
||||||
gem install --no-ri --no-rdoc fpm
|
gem install --no-ri --no-rdoc fpm
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
4
scripts/prepare_debian.sh
Executable file
4
scripts/prepare_debian.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y build-essential ruby1.9.1-dev git python-pip python-dev python-virtualenv libxml2-dev libxslt-dev libffi-dev libmysqlclient-dev libpq-dev libsqlite3-dev
|
Loading…
Reference in New Issue
Block a user