Add piptools step after stripped compile
This commit is contained in:
parent
9e391400dd
commit
705dc55add
@ -1,11 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set +x
|
||||||
which pyreq-merge &> /dev/null
|
which pyreq-merge &> /dev/null
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
>&2 echo pyreq-merge missing, please install requirements
|
>&2 echo pyreq-merge missing, please install requirements
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PIP_INDEX_URL=${PIP_INDEX_URL:-http://localhost/python}
|
||||||
in=$(mktemp)
|
in=$(mktemp)
|
||||||
out=$(mktemp)
|
out=$(mktemp)
|
||||||
>&2 echo using tmp $t
|
>&2 echo using tmp $t
|
||||||
@ -31,10 +33,18 @@ cp -v $out compiled_requirements.txt
|
|||||||
|
|
||||||
outd=$(mktemp -d)
|
outd=$(mktemp -d)
|
||||||
for r in ${repos[@]}; do
|
for r in ${repos[@]}; do
|
||||||
f="$r/requirements.txt"
|
f=$(realpath $r/requirements.txt)
|
||||||
b=$(basename $f)
|
b=$(basename $f)
|
||||||
|
b_in=$b.in
|
||||||
d=$(basename $r)
|
d=$(basename $r)
|
||||||
echo output to $outd/$d/$b
|
echo output to $outd/$d/$b_in
|
||||||
mkdir -vp $outd/$d
|
mkdir -vp $outd/$d
|
||||||
pyreq-update -v $f compiled_requirements.txt > $outd/$d/$b
|
echo "-r $f" > $outd/$d/$b_in
|
||||||
|
pyreq-update -v $f compiled_requirements.txt >> $outd/$d/$b_in
|
||||||
|
pip-compile -v --extra-index-url $PIP_INDEX_URL $outd/$d/$b_in -o $outd/$d/$b
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
>&2 echo requirement compile failed for $f
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
set -x
|
||||||
|
@ -1 +1,2 @@
|
|||||||
requirements-magic~=0.0.3a1
|
requirements-magic~=0.0.3a1
|
||||||
|
pip-tools==6.2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user