Skip to content

Commit

Permalink
Add fallback for PostGIS CI installation on Windows (#4289)
Browse files Browse the repository at this point in the history
(cherry picked from commit bfb128a)
  • Loading branch information
Brar authored and roji committed Feb 1, 2022
1 parent e31c4a3 commit 59aa308
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,20 @@ jobs:
curl -Ls https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }} |
sed -n 's/.*>postgis-bundle-pg${{ matrix.pg_major }}-\(${{ env.postgis_version }}.[0-9]*.[0-9]*\)x64.zip<.*/\1/p' |
tail -n 1)
if [ -z "$OSGEO_VERSION" ]; then
OSGEO_VERSION=$(\
curl -Ls https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }}/archive |
sed -n 's/.*>postgis-bundle-pg${{ matrix.pg_major }}-\(${{ env.postgis_version }}.[0-9]*.[0-9]*\)x64.zip<.*/\1/p' |
tail -n 1)
POSTGIS_PATH="archive/"
else
POSTGIS_PATH=""
fi
# Install PostGIS
echo "Installing PostGIS (version: ${OSGEO_VERSION})"
POSTGIS_FILE="postgis-bundle-pg${{ matrix.pg_major }}-${OSGEO_VERSION}x64"
curl -o postgis.zip -L https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }}/${POSTGIS_FILE}.zip
curl -o postgis.zip -L https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }}/${POSTGIS_PATH}${POSTGIS_FILE}.zip
unzip postgis.zip -d postgis
cp -a postgis/$POSTGIS_FILE/. pgsql/
Expand Down

0 comments on commit 59aa308

Please sign in to comment.