mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 09:48:51 -03:30
Deal properly with comments in requirements_git.txt
The updater.sh script was expecting that _every_ line in this file was a repo reference.
This commit is contained in:
@@ -14,17 +14,19 @@ _cleanup() {
|
|||||||
generate_requirements() {
|
generate_requirements() {
|
||||||
venv="`pwd`/venv"
|
venv="`pwd`/venv"
|
||||||
echo $venv
|
echo $venv
|
||||||
/usr/bin/python3.8 -m venv "${venv}"
|
/usr/bin/python3 -m venv "${venv}"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source ${venv}/bin/activate
|
source ${venv}/bin/activate
|
||||||
|
|
||||||
${venv}/bin/python3.8 -m pip install -U pip pip-tools
|
${venv}/bin/python3 -m pip install -U pip pip-tools
|
||||||
|
|
||||||
${pip_compile} --output-file requirements.txt "${requirements_in}" "${requirements_git}"
|
${pip_compile} "${requirements_in}" "${requirements_git}" --output-file requirements.txt
|
||||||
# consider the git requirements for purposes of resolving deps
|
# consider the git requirements for purposes of resolving deps
|
||||||
# Then remove any git+ lines from requirements.txt
|
# Then remove any git+ lines from requirements.txt
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
sed -i "\!${line%#*}!d" requirements.txt
|
if [[ $line != \#* ]]; then # ignore comments
|
||||||
|
sed -i "\!${line%#*}!d" requirements.txt
|
||||||
|
fi
|
||||||
done < "${requirements_git}"
|
done < "${requirements_git}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user