From d95b9940068494c44c05e245d2f57285289e78ef Mon Sep 17 00:00:00 2001 From: fnecas Date: Thu, 15 Feb 2024 11:19:26 +0100 Subject: [PATCH 1/2] feat: vrt log in file --- vrt.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/vrt.sh b/vrt.sh index 2560179..99ec377 100755 --- a/vrt.sh +++ b/vrt.sh @@ -24,7 +24,8 @@ set -e # horodatage pour commentaires DATE=$(date "+%A %d/%m/%Y %H:%M:%S") - +rm -f ${SOURCEDIR}/vrtbot.log +touch ${SOURCEDIR}/vrtbot.log if [ -n "$(ls -A $SOURCEDIR 2>/dev/null)" ] then @@ -33,21 +34,21 @@ DATE=$(date "+%A %d/%m/%Y %H:%M:%S") # cycle vrt for vrt in *.vrt; do - echo "import de ${SOURCEDIR}/${vrt} dans le schema ${ACTIVESCHEMA} de la base ${PGDATABASE}" + echo "import de ${SOURCEDIR}/${vrt} dans le schema ${ACTIVESCHEMA} de la base ${PGDATABASE}" | tee -a vrtbot.log /usr/bin/ogr2ogr \ -f Postgresql \ -overwrite \ - PG:"active_schema=${ACTIVESCHEMA}" "${vrt}" -lco SCHEMA=${ACTIVESCHEMA} -lco OVERWRITE=yes -lco GEOMETRY_NAME=geometry -nlt PROMOTE_TO_MULTI -lco DESCRIPTION="import par ${JOB_NAME}/${BUILD_NUMBER} le ${DATE} - ${SOURCEDIR}/${vrt}" + PG:"active_schema=${ACTIVESCHEMA}" "${vrt}" -lco SCHEMA=${ACTIVESCHEMA} -lco OVERWRITE=yes -lco GEOMETRY_NAME=geometry -nlt PROMOTE_TO_MULTI -lco DESCRIPTION="import par ${JOB_NAME}/${BUILD_NUMBER} le ${DATE} - ${SOURCEDIR}/${vrt}" 2>&1 | tee -a vrtbot.log # post import sql if [ -f "${vrt}.sql" ]; then - echo "script sql après import trouvé" + echo "script sql après import trouvé" | tee -a vrtbot.log source "settings" - psql -f "${vrt}.sql" - echo "script sql après import exécuté" + psql -f "${vrt}.sql" | tee -a vrtbot.log + echo "script sql après import exécuté" | tee -a vrtbot.log fi done else - echo "${SOURCEDIR} n'existe pas" + echo "${SOURCEDIR} n'existe pas" | tee -a vrtbot.log fi From bc5b8c7c158b30f99110ac2eb4a728379f9237bb Mon Sep 17 00:00:00 2001 From: Florian Necas Date: Fri, 16 Feb 2024 11:38:52 +0100 Subject: [PATCH 2/2] fix: update tag in docker-hub md --- DOCKER_HUB.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER_HUB.md b/DOCKER_HUB.md index 98374e0..52da8ec 100644 --- a/DOCKER_HUB.md +++ b/DOCKER_HUB.md @@ -8,7 +8,7 @@ # Featured tags -- `latest`, `23.0.x` +- `latest` # Quick reference