diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 687f6d14..cc59f57d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,6 +40,12 @@ jobs: # This means that the two-part version image will always point to latest patch. export VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]} \ ${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" + echo "Current content of openmaptiles/__init__.py:" + cat openmaptiles/__init__.py + echo "Updating version in openmaptiles/__init__.py to ${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}" + sed -i -e 's/^__version__ = '"'"'[0-9]\+[.][0-9]\+[.][0-9]\+'"'"'/__version__ = '"'${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}'"'/g' openmaptiles/__init__.py + echo "New content of openmaptiles/__init__.py:" + cat openmaptiles/__init__.py else echo "Unrecognized ref ${GITHUB_REF}, no docker images are built or uploaded" exit 0 diff --git a/Dockerfile b/Dockerfile index 434b810e..097dbc95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,6 +129,9 @@ RUN set -eux ;\ /bin/bash -c 'echo ""; echo ""; echo "##### Cleaning up"' >&2 ;\ rm -rf /var/lib/apt/lists/* +RUN groupadd --gid 1000 openmaptiles \ + && useradd --uid 1000 --gid openmaptiles --shell /bin/bash --create-home openmaptiles + # Copy requirements.txt first to avoid pip install on every code change COPY ./requirements.txt . RUN pip install --no-cache-dir -r requirements.txt diff --git a/bin/generate-tiles b/bin/generate-tiles index b149b8b4..8d57fdbd 100755 --- a/bin/generate-tiles +++ b/bin/generate-tiles @@ -13,12 +13,12 @@ export PGPORT="${POSTGRES_PORT:-${PGPORT:-5432}}" # List of postgres servers # "xxx.xxx.xxx.xxx&host=xxx.xxx.xxx.xxx&host=..." -if [[ -z "${PGHOSTS_LIST}" ]] -then +if [[ -z "${PGHOSTS_LIST}" ]]; then export HOST_COUNT=1 export PGHOSTS="${POSTGRES_HOST:-${PGHOST?}}" else - export HOST_COUNT=`awk -F"&" '{print NF}' <<< "${PGHOSTS_LIST}"` + HOST_COUNT=$(awk -F"&" '{print NF}' <<< "${PGHOSTS_LIST}") + export HOST_COUNT export PGHOSTS="${PGHOSTS_LIST}" fi diff --git a/docker/postgis/Dockerfile b/docker/postgis/Dockerfile index a82b8915..9d54a58e 100644 --- a/docker/postgis/Dockerfile +++ b/docker/postgis/Dockerfile @@ -39,7 +39,7 @@ RUN set -eux ;\ libkakasi2-dev \ libgdal-dev \ ;\ - ## Install specific GEOS version + ## Install specific GEOS version cd /opt/ ;\ curl -o /opt/geos.tar.bz2 http://download.osgeo.org/geos/geos-${GEOS_VER}.tar.bz2 ;\ mkdir /opt/geos ;\ diff --git a/docs/LocalDocker.md b/docs/LocalDocker.md index 8e500057..71ffb393 100644 --- a/docs/LocalDocker.md +++ b/docs/LocalDocker.md @@ -1,6 +1,6 @@ ## Connect local `openmaptiles-tools` with local `openmaptiles`: -Very helpful for contributors who want to develop and test `openmaptiles-tools` with `openmaptiles` together. +Very helpful for contributors who want to develop and test `openmaptiles-tools` with `openmaptiles` together. ### Change docker path in `docker-compose.yml`