diff options
author | Scott Moser <smoser@brickies.net> | 2016-09-09 21:46:49 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-09-09 21:46:49 -0400 |
commit | ea732e69516983b1d9838b0d80540a832594748a (patch) | |
tree | f23cbf03e360f913e98e15d232bcf871770806e8 /Makefile | |
parent | eb5860ec6ed76a90fb837001ab2ed54e1dcf78de (diff) | |
parent | 34a26f7f59f2963691e36ca0476bec9fc9ccef63 (diff) | |
download | vyos-cloud-init-ea732e69516983b1d9838b0d80540a832594748a.tar.gz vyos-cloud-init-ea732e69516983b1d9838b0d80540a832594748a.zip |
Merge branch 'master' into ubuntu/xenial
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -1,21 +1,20 @@ CWD=$(shell pwd) -PYVER ?= 3 +PYVER ?= $(shell for p in python3 python2; do \ + out=$(which $$p 2>&1) && echo $$p && exit; done; \ + exit 1) noseopts ?= -v YAML_FILES=$(shell find cloudinit bin tests tools -name "*.yaml" -type f ) YAML_FILES+=$(shell find doc/examples -name "cloud-config*.txt" -type f ) -CHANGELOG_VERSION=$(shell $(CWD)/tools/read-version) -CODE_VERSION=$(shell python -c "from cloudinit import version; print version.version_string()") - PIP_INSTALL := pip install -ifeq ($(PYVER),3) +ifeq ($(PYVER),python3) pyflakes = pyflakes3 unittests = unittest3 yaml = yaml else -ifeq ($(PYVER),2) +ifeq ($(PYVER),python2) pyflakes = pyflakes unittests = unittest else @@ -28,6 +27,10 @@ ifeq ($(distro),) distro = redhat endif +READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version) +CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())") + + all: check check: check_version pep8 $(pyflakes) test $(yaml) @@ -58,8 +61,8 @@ pip-test-requirements: test: $(unittests) check_version: - @if [ "$(CHANGELOG_VERSION)" != "$(CODE_VERSION)" ]; then \ - echo "Error: ChangeLog version $(CHANGELOG_VERSION)" \ + @if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \ + echo "Error: read-version version $(READ_VERSION)" \ "not equal to code version $(CODE_VERSION)"; exit 2; \ else true; fi |