mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
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.
This commit is contained in:
8
Makefile
8
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) > $@
|
||||
|
||||
Reference in New Issue
Block a user