Add post-receive sample hook
This commit is contained in:
parent
9d53c7d292
commit
2f0ac6bb76
2 changed files with 11 additions and 0 deletions
|
@ -31,6 +31,9 @@ The `strecken.pmtiles` file is best generated using the
|
||||||
possible using the `umap-extractor.py` script, which takes care of
|
possible using the `umap-extractor.py` script, which takes care of
|
||||||
exporting the data as well as the graphical style for each layer.
|
exporting the data as well as the graphical style for each layer.
|
||||||
|
|
||||||
|
A sample git `post-receive` hook is provided to build and deploy the
|
||||||
|
map when the map data is pushed.
|
||||||
|
|
||||||
### Input Data
|
### Input Data
|
||||||
|
|
||||||
The input data for `strecken.pmtiles` consists of a `data/` folder,
|
The input data for `strecken.pmtiles` consists of a `data/` folder,
|
||||||
|
|
8
scripts/post-receive.sample
Executable file
8
scripts/post-receive.sample
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
temp=$(mktemp -d)
|
||||||
|
outdir=/var/www/html/$(basename $(pwd))
|
||||||
|
mkdir -p $outdir
|
||||||
|
git --work-tree=$temp --git-dir=$GIT_DIR checkout -f
|
||||||
|
~/scripts/mapbuilder.sh $temp $outdir
|
||||||
|
cp $temp/layers.json $outdir
|
||||||
|
rm -r $temp
|
Loading…
Reference in a new issue