Skip to content

Commit b6468d3

Browse files
authored
add dependabot (#39)
1 parent b7bfb47 commit b6468d3

File tree

5 files changed

+32
-15
lines changed

5 files changed

+32
-15
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# `dependabot.yml` file with updates
2+
3+
# Update manually "Insights -> Dependency Graph -> Dependabot"
4+
5+
version: 2
6+
updates:
7+
# Configuration for Dockerfile
8+
- package-ecosystem: "docker"
9+
directory: "/scripts/"
10+
schedule:
11+
interval: "daily"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
# Check for updates to GitHub Actions every month
17+
interval: "monthly"

scripts/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
ARG VERSION
2-
FROM ghcr.io/osgeo/proj:${VERSION:-9.5.0}
1+
FROM ghcr.io/osgeo/proj:9.6.2
32

43
ARG PYPROJ_VERSION 3.3.0
54
ENV PYPROJ_VERSION=$PYPROJ_VERSION

scripts/generate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ def adapt_crs(crs):
124124

125125
def make_mapping(home_dir):
126126
today = date.today().isoformat()
127+
proj_version = pyproj.database.get_database_metadata("PROJ.VERSION")
127128
mapping = {'home_dir': home_dir,
128129
'lang': 'en',
129130
'authority': None,
130-
'last_revised': os.getenv('LAST_REVISED', '-missing-'),
131-
'proj_version': os.getenv('PROJ_VERSION', '-missing-'),
131+
'proj_version': proj_version,
132132
'built_date': today,}
133133
return mapping
134134

@@ -448,4 +448,4 @@ def main():
448448

449449

450450
if __name__ == '__main__':
451-
exit(main())
451+
exit(main())

scripts/run.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
#!/usr/bin/env bash
22
set -Eeuo pipefail
33

4-
# indicate DOCKER PROJ version
5-
PROJ_VERSION=9.6.2
6-
PYPROJ_VERSION=3.7.1
7-
LAST_REVISED=2025
8-
TAG="crs-explorer:$PROJ_VERSION"
9-
STOP_COUNTER="${1:-0}"
10-
114
# prepare destination
125
DIRNAME=`dirname $(readlink -f $0)`
136
mkdir -p $DIRNAME/dist
147
test "$(ls -A $DIRNAME/dist/)" && rm -r $DIRNAME/dist/*
158

9+
# extract PROJ version from Dockerfile
10+
PROJ_VERSION=`cat $DIRNAME/Dockerfile | sed -n 's/^FROM .*:\(.*\)$/\1/p'`
11+
echo "PROJ_VERSION=$PROJ_VERSION"
12+
13+
PYPROJ_VERSION=3.7.1
14+
15+
DOCKER_TAG="crs-explorer:$PROJ_VERSION"
16+
STOP_COUNTER="${1:-0}"
17+
1618
# build container
17-
docker build --pull --platform=linux/amd64 --build-arg VERSION=$PROJ_VERSION --build-arg PYPROJ_VERSION=$PYPROJ_VERSION --tag $TAG $DIRNAME
19+
docker build --pull --platform=linux/amd64 --build-arg PYPROJ_VERSION=$PYPROJ_VERSION --tag $DOCKER_TAG $DIRNAME
1820

1921
# execute container
20-
docker run --user $(id -u):$(id -g) -e STOP_COUNTER=$STOP_COUNTER -e LAST_REVISED=$LAST_REVISED -e PROJ_VERSION=$PROJ_VERSION --rm -v "$DIRNAME/dist:/home/dist" $TAG
22+
docker run --user $(id -u):$(id -g) -e STOP_COUNTER=$STOP_COUNTER --rm -v "$DIRNAME/dist:/home/dist" $DOCKER_TAG
2123

2224
# done
2325
echo .

scripts/templates/index.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
<p>Click the Map to open the Explorer</p>
6060
<img src="https://a.tile.openstreetmap.org/0/0/0.png">
6161
</a>
62-
<p>Last revised in {{ last_revised }}</p>
6362
</div>
6463
<div id="footer">
6564
{% include 'sections/footer.tmpl' %} - Code implementation inspired by <a href="https://crs-explorer.proj.org">crs-explorer.proj.org</a>

0 commit comments

Comments
 (0)