summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorShane McDonald <me@shanemcd.com>2017-07-25 16:54:42 +0200
committerShane McDonald <me@shanemcd.com>2017-07-25 17:09:51 +0200
commit7695cb6419238c9d48c878c094b722fa82633599 (patch)
tree23e1a14c864dcd3a478c2ca407ed1afe17375f56 /Makefile
parentMerge pull request #23 from wenottingham/do-pmrun-run-run (diff)
downloadawx-7695cb6419238c9d48c878c094b722fa82633599.tar.xz
awx-7695cb6419238c9d48c878c094b722fa82633599.zip
Fix version when installing from sdist
When installing an sdist, setup.py is invoked on the machine you're installing on. We extract the version from a git tag, but the repo is not included in the sdist. The git describe --long command will silently fail and cause the installed package to report version 0.0.0.0.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a36cfee834..c4ab38102a 100644
--- a/Makefile
+++ b/Makefile
@@ -86,7 +86,7 @@ UI_RELEASE_FLAG_FILE = awx/ui/.release_built
reprepro setup_tarball virtualbox-ovf virtualbox-centos-7 \
virtualbox-centos-6 clean-bundle setup_bundle_tarball \
ui-docker-machine ui-docker ui-release ui-devel \
- ui-test ui-deps ui-test-ci ui-test-saucelabs jlaska
+ ui-test ui-deps ui-test-ci ui-test-saucelabs jlaska VERSION
# remove ui build artifacts
clean-ui:
@@ -117,6 +117,7 @@ clean: clean-ui clean-dist
rm -rf requirements/vendor
rm -rf tmp
rm -rf $(I18N_FLAG_FILE)
+ rm -f VERSION
mkdir tmp
rm -rf build $(NAME)-$(VERSION) *.egg-info
find . -type f -regex ".*\.py[co]$$" -delete
@@ -535,7 +536,7 @@ dev_build:
release_build:
$(PYTHON) setup.py release_build
-dist/$(SDIST_TAR_FILE): ui-release
+dist/$(SDIST_TAR_FILE): ui-release VERSION
BUILD="$(BUILD)" $(PYTHON) setup.py $(SDIST_COMMAND)
dist/$(WHEEL_FILE): ui-release
@@ -621,3 +622,6 @@ clean-elk:
psql-container:
docker run -it --net tools_default --rm postgres:9.4.1 sh -c 'exec psql -h "postgres" -p "5432" -U postgres'
+
+VERSION:
+ echo $(RELEASE_VERSION) > $@