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
|
# Enable provisioning with a shell script. Additional provisioners such as
|
||||||
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
||||||
# documentation for more information about their specific syntax and use.
|
# documentation for more information about their specific syntax and use.
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", args: ENV['REVISION'], path: 'packaging.sh'
|
||||||
/bin/bash /vagrant/packaging.sh
|
|
||||||
SHELL
|
|
||||||
end
|
end
|
||||||
|
|
13
packaging.sh
13
packaging.sh
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
==============++=== Imposm Packaging Script ============================
|
=================== Imposm Packaging Script ============================
|
||||||
|
|
||||||
This script creates binary packages for Imposm 3 for Linux.
|
This script creates binary packages for Imposm 3 for Linux.
|
||||||
It installs and builds all dependencies, compiles the master
|
It installs and builds all dependencies, compiles the master
|
||||||
|
@ -27,17 +27,25 @@ or
|
||||||
$ vagrant ssh
|
$ vagrant ssh
|
||||||
% bash /vagrant/packaging.sh
|
% 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:
|
To shutdown the VM:
|
||||||
$ vagrant halt
|
$ vagrant halt
|
||||||
|
|
||||||
To remove the VM:
|
To remove the VM:
|
||||||
$ vagrant destroy
|
$ vagrant destroy
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
# set -x
|
# set -x
|
||||||
|
|
||||||
|
REVISION=${1:-master}
|
||||||
|
|
||||||
BUILD_BASE=$HOME/imposm
|
BUILD_BASE=$HOME/imposm
|
||||||
PREFIX=$BUILD_BASE/local
|
PREFIX=$BUILD_BASE/local
|
||||||
SRC=$BUILD_BASE/src
|
SRC=$BUILD_BASE/src
|
||||||
|
@ -47,7 +55,6 @@ export GOROOT=$BUILD_BASE/go
|
||||||
IMPOSM_SRC=$GOPATH/src/github.com/omniscale/imposm3
|
IMPOSM_SRC=$GOPATH/src/github.com/omniscale/imposm3
|
||||||
BUILD_TMP=$BUILD_BASE/imposm-build
|
BUILD_TMP=$BUILD_BASE/imposm-build
|
||||||
|
|
||||||
|
|
||||||
GEOS_VERSION=3.5.0
|
GEOS_VERSION=3.5.0
|
||||||
|
|
||||||
export CGO_CFLAGS=-I$PREFIX/include
|
export CGO_CFLAGS=-I$PREFIX/include
|
||||||
|
@ -150,7 +157,7 @@ pushd $IMPOSM_SRC
|
||||||
popd
|
popd
|
||||||
|
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git checkout build-refactor
|
git checkout $REVISION
|
||||||
|
|
||||||
echo '-> compiling imposm'
|
echo '-> compiling imposm'
|
||||||
make clean
|
make clean
|
||||||
|
|
Loading…
Reference in New Issue