Skip to content

Commit

Permalink
packaging: do not set BUILD_VERSION if IMPOSM_BUILD_RELEASE is set
Browse files Browse the repository at this point in the history
  • Loading branch information
olt committed Nov 21, 2017
1 parent 4731e99 commit 6dd8107
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -17,7 +17,9 @@ endif

BUILD_DATE=$(shell date +%Y%m%d)
BUILD_REV=$(shell git rev-parse --short HEAD)
ifndef IMPOSM_BUILD_RELEASE
BUILD_VERSION=dev-$(BUILD_DATE)-$(BUILD_REV)
endif
VERSION_LDFLAGS=-X github.com/omniscale/imposm3.buildVersion=$(BUILD_VERSION)

all: build test
Expand Down
5 changes: 4 additions & 1 deletion Vagrantfile
Expand Up @@ -64,5 +64,8 @@ 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", args: ENV['REVISION'], path: 'packaging.sh'
config.vm.provision "shell", env: {
:REVISION => ENV['REVISION'],
:IMPOSM_BUILD_RELEASE => ENV['IMPOSM_BUILD_RELEASE']
}, path: 'packaging.sh'
end
5 changes: 4 additions & 1 deletion packaging.sh
Expand Up @@ -43,7 +43,10 @@ EOF
set -e
# set -x

REVISION=${1:-master}
REVISION=${REVISION:-master}
if [[ -z "$IMPOSM_BUILD_RELEASE" ]]; then
unset IMPOSM_BUILD_RELEASE
fi

BUILD_BASE=$HOME/imposm
PREFIX=$BUILD_BASE/local
Expand Down

0 comments on commit 6dd8107

Please sign in to comment.