diff options
author | Scott Moser <smoser@brickies.net> | 2017-01-20 09:36:51 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-01-23 09:39:01 -0500 |
commit | a3376d45c83e90150d8de79a2b31282a7d760bd7 (patch) | |
tree | 42cdd2896679f37f891f790f3b9b8a499b77db16 /Makefile | |
parent | b71592ce0e0a9f9f9f225315015ca57b312ad30d (diff) | |
download | vyos-cloud-init-a3376d45c83e90150d8de79a2b31282a7d760bd7.tar.gz vyos-cloud-init-a3376d45c83e90150d8de79a2b31282a7d760bd7.zip |
build: fix running Make on a branch with tags other than master
running 'make' on a git branch other than master would fail with
complaint that the tools/read-version reported a different version
than the code.
Change to only consider tags starting with 0-9 in read-version.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -27,7 +27,8 @@ ifeq ($(distro),) distro = redhat endif -READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version) +READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version || \ + echo read-version-failed) CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())") @@ -62,8 +63,8 @@ test: $(unittests) check_version: @if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \ - echo "Error: read-version version $(READ_VERSION)" \ - "not equal to code version $(CODE_VERSION)"; exit 2; \ + echo "Error: read-version version '$(READ_VERSION)'" \ + "not equal to code version '$(CODE_VERSION)'"; exit 2; \ else true; fi clean_pyc: |