allow to build specific revision

master
Oliver Tonnhofer 2016-03-08 15:03:53 +01:00
parent 199a7ba879
commit 7ddef6a41b
2 changed files with 11 additions and 6 deletions

4
Vagrantfile vendored
View File

@ -64,7 +64,5 @@ Vagrant.configure(2) do |config|
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
/bin/bash /vagrant/packaging.sh
SHELL
config.vm.provision "shell", args: ENV['REVISION'], path: 'packaging.sh'
end

View File

@ -1,7 +1,7 @@
#! /bin/bash
cat <<EOF
==============++=== Imposm Packaging Script ============================
=================== Imposm Packaging Script ============================
This script creates binary packages for Imposm 3 for Linux.
It installs and builds all dependencies, compiles the master
@ -27,17 +27,25 @@ or
$ vagrant ssh
% bash /vagrant/packaging.sh
You can specify a revision or branch by setting the REVISION
environment. REVISION defaults to the master branch:
$ REVISION=mybranch vagrant provision
To shutdown the VM:
$ vagrant halt
To remove the VM:
$ vagrant destroy
EOF
set -e
# set -x
REVISION=${1:-master}
BUILD_BASE=$HOME/imposm
PREFIX=$BUILD_BASE/local
SRC=$BUILD_BASE/src
@ -47,7 +55,6 @@ export GOROOT=$BUILD_BASE/go
IMPOSM_SRC=$GOPATH/src/github.com/omniscale/imposm3
BUILD_TMP=$BUILD_BASE/imposm-build
GEOS_VERSION=3.5.0
export CGO_CFLAGS=-I$PREFIX/include
@ -150,7 +157,7 @@ pushd $IMPOSM_SRC
popd
git reset --hard
git checkout build-refactor
git checkout $REVISION
echo '-> compiling imposm'
make clean