Hash :
b79dac6d
Author :
Thomas de Grivel
Date :
2023-02-14T01:15:22
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!/bin/sh
. ~/shpkg/etc/shpkg/profile
. ~/shpkg/share/shpkg/shpkg.subr
logs2html () {
for F in ~/"www/log/${SHPKG_TARGET}/${SHPKG_REPO}".*.log; do
if ! [ -f "$F.html" ]; then
verbose 1 ansi2html "$F"
fi
done
}
main () {
if ! [ -d ~/"www/log/${SHPKG_TARGET}" ]; then
verbose 1 mkdir -p ~/"www/log/${SHPKG_TARGET}"
fi
for SHPKG_REPO; do
SHPKG_REPO_DIR="$(shpkg_dir "${SHPKG_REPO}")"
if [ "x${SHPKG_REPO_DIR}" = "x" ]; then
err 1 "shpkg_ci: unknown repo: $SHPKG_REPO"
fi
shpkg_tag_log "${SHPKG_REPO}.ci.log"
if ! [ -d ~/"shpkg_${SHPKG_REPO}" ]; then
verbose 2 shpkg_bootstrap ~/"shpkg_${SHPKG_REPO}"
fi
( . ~/"shpkg_${SHPKG_REPO}/etc/shpkg/profile"
verbose 2 shpkg upgrade "${SHPKG_REPO}"; )
verbose 1 cp ~/"shpkg_${SHPKG_REPO}/var/log/shpkg/tags/${SHPKG_REPO}".*.log ~/"www/log/${SHPKG_TARGET}/"
verbose 2 logs2html
verbose 2 shpkg_bootstrap -f ~/"shpkg_${SHPKG_REPO}"
( . ~/"shpkg_${SHPKG_REPO}/etc/shpkg/profile"
verbose 2 shpkg install "${SHPKG_REPO}"; )
verbose 1 cp ~/"shpkg_${SHPKG_REPO}/var/log/shpkg/tags/${SHPKG_REPO}".*.log ~/"www/log/${SHPKG_TARGET}"
verbose 1 cp ~/"shpkg/var/log/shpkg/tags/${SHPKG_REPO}.ci.log" ~/"www/log/${SHPKG_TARGET}"
verbose 2 logs2html
done
}
shpkg_log shpkg_ci shpkg_lock shpkg_ci main "$@"