packaging: do not set BUILD_VERSION if IMPOSM_BUILD_RELEASE is set

master
Oliver Tonnhofer 2017-11-21 15:00:43 +01:00
parent 4731e99e19
commit 6dd8107d69
3 changed files with 10 additions and 2 deletions

View File

@ -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

5
Vagrantfile vendored
View File

@ -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

View File

@ -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