mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Merge pull request #13896 from jjwatt/jjwatt-pyver
Fallback on PYTHON path in Makefile
This commit is contained in:
16
Makefile
16
Makefile
@@ -1,6 +1,6 @@
|
|||||||
-include awx/ui_next/Makefile
|
-include awx/ui_next/Makefile
|
||||||
|
|
||||||
PYTHON ?= python3.9
|
PYTHON := $(notdir $(shell for i in python3.9 python3; do command -v $$i; done|sed 1q))
|
||||||
DOCKER_COMPOSE ?= docker-compose
|
DOCKER_COMPOSE ?= docker-compose
|
||||||
OFFICIAL ?= no
|
OFFICIAL ?= no
|
||||||
NODE ?= node
|
NODE ?= node
|
||||||
@@ -606,7 +606,18 @@ VERSION:
|
|||||||
@echo "awx: $(VERSION)"
|
@echo "awx: $(VERSION)"
|
||||||
|
|
||||||
PYTHON_VERSION:
|
PYTHON_VERSION:
|
||||||
@echo "$(PYTHON)" | sed 's:python::'
|
@echo "$(subst python,,$(PYTHON))"
|
||||||
|
|
||||||
|
.PHONY: version-for-buildyml
|
||||||
|
version-for-buildyml:
|
||||||
|
@echo $(firstword $(subst +, ,$(VERSION)))
|
||||||
|
# version-for-buildyml prints a special version string for build.yml,
|
||||||
|
# chopping off the sha after the '+' sign.
|
||||||
|
# tools/ansible/build.yml was doing this: make print-VERSION | cut -d + -f -1
|
||||||
|
# This does the same thing in native make without
|
||||||
|
# the pipe or the extra processes, and now the pb does `make version-for-buildyml`
|
||||||
|
# Example:
|
||||||
|
# 22.1.1.dev38+g523c0d9781 becomes 22.1.1.dev38
|
||||||
|
|
||||||
.PHONY: Dockerfile
|
.PHONY: Dockerfile
|
||||||
## Generate Dockerfile for awx image
|
## Generate Dockerfile for awx image
|
||||||
@@ -658,6 +669,7 @@ messages:
|
|||||||
fi; \
|
fi; \
|
||||||
$(PYTHON) manage.py makemessages -l en_us --keep-pot
|
$(PYTHON) manage.py makemessages -l en_us --keep-pot
|
||||||
|
|
||||||
|
.PHONY: print-%
|
||||||
print-%:
|
print-%:
|
||||||
@echo $($*)
|
@echo $($*)
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
gather_facts: true
|
gather_facts: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Get version from SCM if not explicitly provided
|
- name: Get version from SCM if not explicitly provided
|
||||||
shell: |
|
command: make version-for-buildyml
|
||||||
make print-VERSION | cut -d + -f -1
|
|
||||||
args:
|
args:
|
||||||
chdir: '../../'
|
chdir: '../../'
|
||||||
register: scm_version
|
register: scm_version
|
||||||
|
|||||||
Reference in New Issue
Block a user