Skip to content

Commit

Permalink
update tox.ini's update-requirements (#305)
Browse files Browse the repository at this point in the history
Updates tox.ini's `update-requirements` as described in canonical/argo-operators#100
  • Loading branch information
ca-scribner authored Aug 4, 2023
1 parent 5a19829 commit 81f0938
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions charms/istio-gateway/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ allowlist_externals =
pip-compile
xargs
commands =
; uses 'bash -c' because piping didn't work in regular tox commands
pip-compile -U --resolver=backtracking requirements.in
pip-compile -U --resolver=backtracking requirements-fmt.in
bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile -U --resolver=backtracking \{\}'
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
Expand Down
8 changes: 4 additions & 4 deletions charms/istio-pilot/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ allowlist_externals =
pip-compile
xargs
commands =
; uses 'bash -c' because piping didn't work in regular tox commands
pip-compile -U --resolver=backtracking requirements.in
pip-compile -U --resolver=backtracking requirements-fmt.in
bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile -U --resolver=backtracking \{\}'
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ allowlist_externals =
pip-compile
xargs
commands =
; uses 'bash -c' because piping didn't work in regular tox commands
pip-compile -U --resolver=backtracking requirements-fmt.in
bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile -U --resolver=backtracking \{\}'
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
Expand Down

0 comments on commit 81f0938

Please sign in to comment.