allow to build specific revision
parent
199a7ba879
commit
7ddef6a41b
|
@ -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
|
||||
|
|
13
packaging.sh
13
packaging.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue