tileserver-gl 5.2.1 โ 5.3.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +32 -22
- package/public/resources/fonts/OpenSans-Bold.ttf +0 -0
- package/public/resources/fonts/OpenSans-Italic.ttf +0 -0
- package/public/resources/fonts/OpenSans-Regular.ttf +0 -0
- package/public/resources/leaflet-hash.js +162 -0
- package/public/resources/leaflet.css +661 -0
- package/public/resources/leaflet.js +6 -0
- package/public/resources/leaflet.js.map +1 -0
- package/public/resources/mapbox-gl-rtl-text.js +1 -0
- package/public/resources/maplibre-gl-inspect.css +40 -0
- package/public/resources/maplibre-gl-inspect.js +2877 -0
- package/public/resources/maplibre-gl-inspect.js.map +1 -0
- package/public/resources/maplibre-gl.css +1 -0
- package/public/resources/maplibre-gl.js +59 -0
- package/public/resources/maplibre-gl.js.map +1 -0
- package/public/templates/data.tmpl +3 -0
- package/public/templates/viewer.tmpl +22 -1
- package/src/render.js +1 -2
- package/src/serve_data.js +1 -1
- package/src/serve_rendered.js +1 -1
- package/src/server.js +1 -1
- package/.dockerignore +0 -8
- package/.eslintignore +0 -1
- package/.eslintrc.cjs +0 -36
- package/.gitattributes +0 -11
- package/.github/dependabot.yml +0 -19
- package/.github/workflows/automerger.yml +0 -17
- package/.github/workflows/ci.yml +0 -56
- package/.github/workflows/codeql.yml +0 -37
- package/.github/workflows/ct.yml +0 -86
- package/.github/workflows/pipeline.yml +0 -43
- package/.github/workflows/release.yml +0 -175
- package/.hadolint.yml +0 -3
- package/.nvmrc +0 -1
- package/.prettierignore +0 -1
- package/.readthedocs.yaml +0 -18
- package/Dockerfile +0 -110
- package/Dockerfile_build +0 -38
- package/Dockerfile_light +0 -84
- package/Dockerfile_test +0 -62
- package/ISSUE_TEMPLATE.md +0 -21
- package/PUBLISHING.md +0 -112
- package/README_light.md +0 -35
- package/commitlint.config.cjs +0 -3
- package/docker-entrypoint.sh +0 -10
- package/docker-entrypoint_light.sh +0 -7
- package/lint-staged.config.cjs +0 -4
- package/prettier.config.cjs +0 -13
- package/publish.js +0 -66
|
@@ -126,6 +126,9 @@
|
|
|
126
126
|
style: style
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
+
//disabled at the moment; clarify/disable coordinates off the globe to re-enable
|
|
130
|
+
//map.addControl(new maplibregl.GlobeControl());
|
|
131
|
+
|
|
129
132
|
map.addControl(new maplibregl.NavigationControl({
|
|
130
133
|
visualizePitch: true,
|
|
131
134
|
showZoom: true,
|
|
@@ -58,18 +58,39 @@
|
|
|
58
58
|
var keyParam = keyMatch ? '?key=' + keyMatch[1] : '';
|
|
59
59
|
|
|
60
60
|
if (preference == 'vector') {
|
|
61
|
-
maplibregl.setRTLTextPlugin('{{public_url}}mapbox-gl-rtl-text.js' + keyParam);
|
|
61
|
+
maplibregl.setRTLTextPlugin('{{public_url}}mapbox-gl-rtl-text.js' + keyParam, true);
|
|
62
62
|
var map = new maplibregl.Map({
|
|
63
63
|
container: 'map',
|
|
64
64
|
style: '{{public_url}}styles/{{id}}/style.json' + keyParam,
|
|
65
65
|
hash: true,
|
|
66
66
|
maxPitch: 85
|
|
67
67
|
});
|
|
68
|
+
map.addControl(new maplibregl.GlobeControl());
|
|
68
69
|
map.addControl(new maplibregl.NavigationControl({
|
|
69
70
|
visualizePitch: true,
|
|
70
71
|
showZoom: true,
|
|
71
72
|
showCompass: true
|
|
72
73
|
}));
|
|
74
|
+
|
|
75
|
+
//check if terrain is available, before enabling the control
|
|
76
|
+
map.on('style.load', function () {
|
|
77
|
+
var terrainId = null;
|
|
78
|
+
Object.entries(map.getStyle().sources).some(function (source) {
|
|
79
|
+
if (source[1].type == "raster-dem") {
|
|
80
|
+
terrainId = source[0];
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
if (terrainId) {
|
|
86
|
+
map.addControl(
|
|
87
|
+
new maplibregl.TerrainControl({
|
|
88
|
+
source: terrainId,
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
73
94
|
map.addControl(new MaplibreInspect({
|
|
74
95
|
showMapPopupOnHover: false,
|
|
75
96
|
showInspectMapPopupOnHover: false,
|
package/src/render.js
CHANGED
package/src/serve_data.js
CHANGED
|
@@ -7,7 +7,7 @@ import clone from 'clone';
|
|
|
7
7
|
import express from 'express';
|
|
8
8
|
import Pbf from 'pbf';
|
|
9
9
|
import { VectorTile } from '@mapbox/vector-tile';
|
|
10
|
-
import SphericalMercator from '@mapbox/sphericalmercator';
|
|
10
|
+
import { SphericalMercator } from '@mapbox/sphericalmercator';
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
13
|
fixTileJSONCenter,
|
package/src/serve_rendered.js
CHANGED
|
@@ -20,7 +20,7 @@ import clone from 'clone';
|
|
|
20
20
|
import Color from 'color';
|
|
21
21
|
import express from 'express';
|
|
22
22
|
import sanitize from 'sanitize-filename';
|
|
23
|
-
import SphericalMercator from '@mapbox/sphericalmercator';
|
|
23
|
+
import { SphericalMercator } from '@mapbox/sphericalmercator';
|
|
24
24
|
import mlgl from '@maplibre/maplibre-gl-native';
|
|
25
25
|
import polyline from '@mapbox/polyline';
|
|
26
26
|
import proj4 from 'proj4';
|
package/src/server.js
CHANGED
|
@@ -10,7 +10,7 @@ import cors from 'cors';
|
|
|
10
10
|
import enableShutdown from 'http-shutdown';
|
|
11
11
|
import express from 'express';
|
|
12
12
|
import handlebars from 'handlebars';
|
|
13
|
-
import SphericalMercator from '@mapbox/sphericalmercator';
|
|
13
|
+
import { SphericalMercator } from '@mapbox/sphericalmercator';
|
|
14
14
|
const mercator = new SphericalMercator();
|
|
15
15
|
import morgan from 'morgan';
|
|
16
16
|
import { serve_data } from './serve_data.js';
|
package/.dockerignore
DELETED
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
public
|
package/.eslintrc.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
node: true,
|
|
6
|
-
es6: true,
|
|
7
|
-
},
|
|
8
|
-
parserOptions: {
|
|
9
|
-
parser: '@typescript-eslint/parser',
|
|
10
|
-
ecmaVersion: 2020,
|
|
11
|
-
sourceType: 'module',
|
|
12
|
-
lib: ['es2020'],
|
|
13
|
-
ecmaFeatures: {
|
|
14
|
-
jsx: true,
|
|
15
|
-
tsx: true,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
plugins: ['prettier', 'jsdoc', 'security'],
|
|
19
|
-
extends: [
|
|
20
|
-
'prettier',
|
|
21
|
-
'plugin:@typescript-eslint/recommended',
|
|
22
|
-
'plugin:@typescript-eslint/eslint-recommended',
|
|
23
|
-
'plugin:prettier/recommended',
|
|
24
|
-
'plugin:jsdoc/recommended',
|
|
25
|
-
'plugin:security/recommended',
|
|
26
|
-
],
|
|
27
|
-
// add your custom rules here
|
|
28
|
-
rules: {
|
|
29
|
-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
30
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
31
|
-
'@typescript-eslint/no-unused-vars': [
|
|
32
|
-
'warn',
|
|
33
|
-
{ argsIgnorePattern: 'next|err|info|reject' },
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
};
|
package/.gitattributes
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
###############################################################################
|
|
2
|
-
# Set default behavior to automatically normalize line endings.
|
|
3
|
-
###############################################################################
|
|
4
|
-
* text=auto
|
|
5
|
-
|
|
6
|
-
###############################################################################
|
|
7
|
-
# behavior for Unix scripts
|
|
8
|
-
#
|
|
9
|
-
# Unix scripts are treated as binary by default.
|
|
10
|
-
###############################################################################
|
|
11
|
-
*.sh eol=lf
|
package/.github/dependabot.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: npm
|
|
4
|
-
versioning-strategy: increase
|
|
5
|
-
directory: '/'
|
|
6
|
-
schedule:
|
|
7
|
-
interval: daily
|
|
8
|
-
commit-message:
|
|
9
|
-
prefix: fix
|
|
10
|
-
prefix-development: chore
|
|
11
|
-
include: scope
|
|
12
|
-
- package-ecosystem: github-actions
|
|
13
|
-
directory: '/'
|
|
14
|
-
schedule:
|
|
15
|
-
interval: weekly
|
|
16
|
-
commit-message:
|
|
17
|
-
prefix: fix
|
|
18
|
-
prefix-development: chore
|
|
19
|
-
include: scope
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
name: 'Auto Merge PRs'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
pull-requests: write
|
|
8
|
-
contents: write
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
automerge:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: fastify/github-action-merge-dependabot@v3
|
|
15
|
-
with:
|
|
16
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
17
|
-
target: minor
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
name: 'Continuous Integration'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
checks: write
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
ci:
|
|
12
|
-
runs-on: ubuntu-22.04
|
|
13
|
-
steps:
|
|
14
|
-
- name: Check out repository โจ (non-dependabot)
|
|
15
|
-
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
16
|
-
uses: actions/checkout@v4
|
|
17
|
-
|
|
18
|
-
- name: Check out repository ๐ (dependabot)
|
|
19
|
-
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
20
|
-
uses: actions/checkout@v4
|
|
21
|
-
with:
|
|
22
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies (Ubuntu) ๐
|
|
25
|
-
run: >-
|
|
26
|
-
sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev
|
|
27
|
-
libgif-dev build-essential
|
|
28
|
-
|
|
29
|
-
- name: Setup node env ๐ฆ
|
|
30
|
-
uses: actions/setup-node@v4
|
|
31
|
-
with:
|
|
32
|
-
node-version-file: 'package.json'
|
|
33
|
-
check-latest: true
|
|
34
|
-
cache: 'npm'
|
|
35
|
-
|
|
36
|
-
- name: Install dependencies ๐
|
|
37
|
-
run: npm ci --prefer-offline --no-audit --omit=optional
|
|
38
|
-
|
|
39
|
-
- name: Run linter(s) ๐
|
|
40
|
-
uses: wearerequired/lint-action@v2
|
|
41
|
-
with:
|
|
42
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
-
continue_on_error: false
|
|
44
|
-
git_name: github-actions[bot]
|
|
45
|
-
git_email: github-actions[bot]@users.noreply.github.com
|
|
46
|
-
auto_fix: false
|
|
47
|
-
eslint: true
|
|
48
|
-
eslint_extensions: js,cjs,mjs,ts
|
|
49
|
-
prettier: true
|
|
50
|
-
prettier_extensions: js,cjs,ts,json
|
|
51
|
-
|
|
52
|
-
- name: Run hadolint ๐ณ
|
|
53
|
-
uses: hadolint/hadolint-action@v3.1.0
|
|
54
|
-
with:
|
|
55
|
-
dockerfile: Dockerfile
|
|
56
|
-
ignore: DL3008,DL3015
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: 'CodeQL'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
schedule:
|
|
11
|
-
- cron: '45 23 * * 2'
|
|
12
|
-
jobs:
|
|
13
|
-
analyze:
|
|
14
|
-
name: Analyze
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
permissions:
|
|
17
|
-
actions: read
|
|
18
|
-
contents: read
|
|
19
|
-
security-events: write
|
|
20
|
-
strategy:
|
|
21
|
-
fail-fast: false
|
|
22
|
-
matrix:
|
|
23
|
-
language: [javascript]
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout
|
|
26
|
-
uses: actions/checkout@v4
|
|
27
|
-
- name: Initialize CodeQL
|
|
28
|
-
uses: github/codeql-action/init@v3
|
|
29
|
-
with:
|
|
30
|
-
languages: ${{ matrix.language }}
|
|
31
|
-
queries: +security-and-quality
|
|
32
|
-
- name: Autobuild
|
|
33
|
-
uses: github/codeql-action/autobuild@v3
|
|
34
|
-
- name: Perform CodeQL Analysis
|
|
35
|
-
uses: github/codeql-action/analyze@v3
|
|
36
|
-
with:
|
|
37
|
-
category: '/language:${{ matrix.language }}'
|
package/.github/workflows/ct.yml
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
name: 'Continuous Testing'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
checks: write
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
ct:
|
|
12
|
-
runs-on: ubuntu-22.04
|
|
13
|
-
steps:
|
|
14
|
-
- name: Check out repository โจ (non-dependabot)
|
|
15
|
-
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
16
|
-
uses: actions/checkout@v4
|
|
17
|
-
|
|
18
|
-
- name: Check out repository ๐ (dependabot)
|
|
19
|
-
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
20
|
-
uses: actions/checkout@v4
|
|
21
|
-
with:
|
|
22
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
|
23
|
-
|
|
24
|
-
- name: Update apt-get ๐
|
|
25
|
-
run: sudo apt-get update -qq
|
|
26
|
-
|
|
27
|
-
- name: Install dependencies (Ubuntu) ๐
|
|
28
|
-
run: >-
|
|
29
|
-
sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev
|
|
30
|
-
libgif-dev build-essential g++ xvfb libgles2-mesa-dev libgbm-dev
|
|
31
|
-
libxxf86vm-dev
|
|
32
|
-
|
|
33
|
-
- name: Setup node env ๐ฆ
|
|
34
|
-
uses: actions/setup-node@v4
|
|
35
|
-
with:
|
|
36
|
-
node-version-file: 'package.json'
|
|
37
|
-
check-latest: true
|
|
38
|
-
cache: 'npm'
|
|
39
|
-
|
|
40
|
-
- name: Install dependencies ๐
|
|
41
|
-
run: npm ci --prefer-offline --no-audit
|
|
42
|
-
|
|
43
|
-
- name: Pull test data ๐ฆ
|
|
44
|
-
run: >-
|
|
45
|
-
wget -O test_data.zip
|
|
46
|
-
https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
|
|
47
|
-
|
|
48
|
-
- name: Prepare test data ๐ฆ
|
|
49
|
-
run: unzip -q test_data.zip -d test_data
|
|
50
|
-
|
|
51
|
-
- name: Run tests ๐งช
|
|
52
|
-
run: xvfb-run --server-args="-screen 0 1024x768x24" npm test
|
|
53
|
-
|
|
54
|
-
- name: Set up QEMU
|
|
55
|
-
uses: docker/setup-qemu-action@v3
|
|
56
|
-
with:
|
|
57
|
-
platforms: 'arm64'
|
|
58
|
-
|
|
59
|
-
- name: Set up Docker Buildx
|
|
60
|
-
uses: docker/setup-buildx-action@v3
|
|
61
|
-
|
|
62
|
-
- name: Test Docker Build
|
|
63
|
-
uses: docker/build-push-action@v6
|
|
64
|
-
with:
|
|
65
|
-
context: .
|
|
66
|
-
push: false
|
|
67
|
-
platforms: linux/arm64,linux/amd64
|
|
68
|
-
cache-from: type=gha
|
|
69
|
-
cache-to: type=gha,mode=max
|
|
70
|
-
|
|
71
|
-
- name: Create Tileserver Light Directory
|
|
72
|
-
run: node publish.js --no-publish
|
|
73
|
-
|
|
74
|
-
- name: Install node dependencies
|
|
75
|
-
run: npm ci --prefer-offline --no-audit
|
|
76
|
-
working-directory: ./light
|
|
77
|
-
|
|
78
|
-
- name: Test Light Version to Docker Hub
|
|
79
|
-
uses: docker/build-push-action@v6
|
|
80
|
-
with:
|
|
81
|
-
context: ./light
|
|
82
|
-
file: ./light/Dockerfile
|
|
83
|
-
push: false
|
|
84
|
-
platforms: linux/arm64,linux/amd64
|
|
85
|
-
cache-from: type=gha
|
|
86
|
-
cache-to: type=gha,mode=max
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
name: 'The Pipeline'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
|
|
11
|
-
concurrency:
|
|
12
|
-
group: ci-${{ github.ref }}-1
|
|
13
|
-
cancel-in-progress: true
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
extract-branch:
|
|
17
|
-
name: 'Fetch branch'
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
outputs:
|
|
20
|
-
current_branch: ${{ steps.get-branch.outputs.current_branch }}
|
|
21
|
-
steps:
|
|
22
|
-
- name: Extract branch name ๐
|
|
23
|
-
id: get-branch
|
|
24
|
-
run: echo "current_branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
|
|
25
|
-
ci:
|
|
26
|
-
name: 'CI'
|
|
27
|
-
needs:
|
|
28
|
-
- extract-branch
|
|
29
|
-
uses: ./.github/workflows/ci.yml
|
|
30
|
-
ct:
|
|
31
|
-
name: 'CT'
|
|
32
|
-
needs:
|
|
33
|
-
- extract-branch
|
|
34
|
-
uses: ./.github/workflows/ct.yml
|
|
35
|
-
automerger:
|
|
36
|
-
name: 'Automerge Dependabot PRs'
|
|
37
|
-
needs:
|
|
38
|
-
- ci
|
|
39
|
-
- ct
|
|
40
|
-
- extract-branch
|
|
41
|
-
if: >
|
|
42
|
-
github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]'
|
|
43
|
-
uses: ./.github/workflows/automerger.yml
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
name: 'Build, Test, Release'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
docker_user:
|
|
7
|
-
description: 'Docker Username'
|
|
8
|
-
required: true
|
|
9
|
-
docker_token:
|
|
10
|
-
description: 'Docker Token'
|
|
11
|
-
required: true
|
|
12
|
-
npm_token:
|
|
13
|
-
description: 'NPM Token'
|
|
14
|
-
required: true
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
release-check:
|
|
18
|
-
name: Check if version is published
|
|
19
|
-
runs-on: ubuntu-latest
|
|
20
|
-
defaults:
|
|
21
|
-
run:
|
|
22
|
-
shell: bash
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
25
|
-
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version-file: 'package.json'
|
|
29
|
-
check-latest: true
|
|
30
|
-
cache: 'npm'
|
|
31
|
-
|
|
32
|
-
- name: Check if version is published
|
|
33
|
-
id: check
|
|
34
|
-
run: |
|
|
35
|
-
currentVersion="$( node -e "console.log(require('./package.json').version)" )"
|
|
36
|
-
isPublished="$( npm view tileserver-gl versions --json | jq -c --arg cv "$currentVersion" 'any(. == $cv)' )"
|
|
37
|
-
echo "version=$currentVersion" >> "$GITHUB_OUTPUT"
|
|
38
|
-
echo "published=$isPublished" >> "$GITHUB_OUTPUT"
|
|
39
|
-
echo "currentVersion: $currentVersion"
|
|
40
|
-
echo "isPublished: $isPublished"
|
|
41
|
-
outputs:
|
|
42
|
-
published: ${{ steps.check.outputs.published }}
|
|
43
|
-
version: ${{ steps.check.outputs.version }}
|
|
44
|
-
|
|
45
|
-
release:
|
|
46
|
-
needs: release-check
|
|
47
|
-
if: ${{ needs.release-check.outputs.published == 'false' }}
|
|
48
|
-
name: 'Build, Test, Publish'
|
|
49
|
-
runs-on: ubuntu-22.04
|
|
50
|
-
env:
|
|
51
|
-
PACKAGE_VERSION: ${{ needs.release-check.outputs.version }}
|
|
52
|
-
steps:
|
|
53
|
-
- name: Check out repository โจ
|
|
54
|
-
uses: actions/checkout@v4
|
|
55
|
-
|
|
56
|
-
- name: Update apt-get ๐
|
|
57
|
-
run: sudo apt-get update -qq
|
|
58
|
-
|
|
59
|
-
- name: Install dependencies (Ubuntu) ๐
|
|
60
|
-
run: >-
|
|
61
|
-
sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev
|
|
62
|
-
libgif-dev build-essential g++ xvfb libgles2-mesa-dev libgbm-dev
|
|
63
|
-
libxxf86vm-dev
|
|
64
|
-
|
|
65
|
-
- name: Setup node env ๐ฆ
|
|
66
|
-
uses: actions/setup-node@v4
|
|
67
|
-
with:
|
|
68
|
-
node-version-file: 'package.json'
|
|
69
|
-
check-latest: true
|
|
70
|
-
cache: 'npm'
|
|
71
|
-
|
|
72
|
-
- name: Install dependencies ๐
|
|
73
|
-
run: npm ci --prefer-offline --no-audit
|
|
74
|
-
|
|
75
|
-
- name: Pull test data ๐ฆ
|
|
76
|
-
run: >-
|
|
77
|
-
wget -O test_data.zip
|
|
78
|
-
https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
|
|
79
|
-
|
|
80
|
-
- name: Prepare test data ๐ฆ
|
|
81
|
-
run: unzip -q test_data.zip -d test_data
|
|
82
|
-
|
|
83
|
-
- name: Run tests ๐งช
|
|
84
|
-
run: xvfb-run --server-args="-screen 0 1024x768x24" npm test
|
|
85
|
-
|
|
86
|
-
- name: Remove Test Data
|
|
87
|
-
run: rm -R test_data*
|
|
88
|
-
|
|
89
|
-
- name: Get release type
|
|
90
|
-
id: prepare_release
|
|
91
|
-
run: |
|
|
92
|
-
RELEASE_TYPE="$(node -e "console.log(require('semver').prerelease('${{ needs.release-check.outputs.version }}') ? 'prerelease' : 'regular')")"
|
|
93
|
-
if [[ $RELEASE_TYPE == 'regular' ]]; then
|
|
94
|
-
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
|
95
|
-
else
|
|
96
|
-
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
- name: Publish to NPM
|
|
100
|
-
run: |
|
|
101
|
-
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
|
102
|
-
npm publish --access public --tag ${{ steps.prepare_release.outputs.prerelease == 'true' && 'next' || 'latest' }}
|
|
103
|
-
env:
|
|
104
|
-
NPM_TOKEN: ${{ github.event.inputs.npm_token }}
|
|
105
|
-
|
|
106
|
-
- name: Set up QEMU
|
|
107
|
-
uses: docker/setup-qemu-action@v3
|
|
108
|
-
with:
|
|
109
|
-
platforms: 'arm64'
|
|
110
|
-
|
|
111
|
-
- name: Set up Docker Buildx
|
|
112
|
-
uses: docker/setup-buildx-action@v3
|
|
113
|
-
|
|
114
|
-
- name: Login to DockerHub
|
|
115
|
-
uses: docker/login-action@v2
|
|
116
|
-
with:
|
|
117
|
-
username: ${{ github.event.inputs.docker_user }}
|
|
118
|
-
password: ${{ github.event.inputs.docker_token }}
|
|
119
|
-
|
|
120
|
-
- name: Build and publish Full Version to Docker Hub
|
|
121
|
-
uses: docker/build-push-action@v6
|
|
122
|
-
with:
|
|
123
|
-
context: .
|
|
124
|
-
push: true
|
|
125
|
-
tags: |
|
|
126
|
-
maptiler/tileserver-gl:${{ steps.prepare_release.outputs.prerelease == 'true' && 'next' || 'latest' }},
|
|
127
|
-
maptiler/tileserver-gl:v${{ env.PACKAGE_VERSION }}
|
|
128
|
-
platforms: linux/arm64,linux/amd64
|
|
129
|
-
cache-from: type=gha
|
|
130
|
-
cache-to: type=gha,mode=max
|
|
131
|
-
|
|
132
|
-
- name: Extract changelog for version
|
|
133
|
-
run: |
|
|
134
|
-
awk '/^##/ { p = 0 }; p == 1 { print }; $0 == "## ${{ env.PACKAGE_VERSION }}" { p = 1 };' CHANGELOG.md > changelog_for_version.md
|
|
135
|
-
cat changelog_for_version.md
|
|
136
|
-
|
|
137
|
-
- name: Publish to Github
|
|
138
|
-
uses: ncipollo/release-action@v1
|
|
139
|
-
env:
|
|
140
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
141
|
-
with:
|
|
142
|
-
tag: v${{ env.PACKAGE_VERSION }}
|
|
143
|
-
name: v${{ env.PACKAGE_VERSION }}
|
|
144
|
-
bodyFile: changelog_for_version.md
|
|
145
|
-
allowUpdates: true
|
|
146
|
-
draft: false
|
|
147
|
-
prerelease: ${{ steps.prepare_release.outputs.prerelease }}
|
|
148
|
-
|
|
149
|
-
- name: Create Tileserver Light Directory
|
|
150
|
-
run: node publish.js --no-publish
|
|
151
|
-
|
|
152
|
-
- name: Install node dependencies
|
|
153
|
-
run: npm ci --prefer-offline --no-audit
|
|
154
|
-
working-directory: ./light
|
|
155
|
-
|
|
156
|
-
- name: Publish to Light Version NPM
|
|
157
|
-
working-directory: ./light
|
|
158
|
-
run: |
|
|
159
|
-
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
|
160
|
-
npm publish --access public --tag ${{ steps.prepare_release.outputs.prerelease == 'true' && 'next' || 'latest' }}
|
|
161
|
-
env:
|
|
162
|
-
NPM_TOKEN: ${{ github.event.inputs.npm_token }}
|
|
163
|
-
|
|
164
|
-
- name: Build and publish Light Version to Docker Hub
|
|
165
|
-
uses: docker/build-push-action@v6
|
|
166
|
-
with:
|
|
167
|
-
context: ./light
|
|
168
|
-
file: ./light/Dockerfile
|
|
169
|
-
push: true
|
|
170
|
-
tags: |
|
|
171
|
-
maptiler/tileserver-gl-light:${{ steps.prepare_release.outputs.prerelease == 'true' && 'next' || 'latest' }},
|
|
172
|
-
maptiler/tileserver-gl-light:v${{ env.PACKAGE_VERSION }}
|
|
173
|
-
platforms: linux/arm64,linux/amd64
|
|
174
|
-
cache-from: type=gha
|
|
175
|
-
cache-to: type=gha,mode=max
|
package/.hadolint.yml
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
18
|
package/.prettierignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
public
|
package/.readthedocs.yaml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Read the Docs configuration file for Sphinx projects
|
|
2
|
-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
-
|
|
4
|
-
# Required
|
|
5
|
-
version: 2
|
|
6
|
-
|
|
7
|
-
# Set the version of Python and other tools you might need
|
|
8
|
-
build:
|
|
9
|
-
os: ubuntu-22.04
|
|
10
|
-
tools:
|
|
11
|
-
python: "3.11"
|
|
12
|
-
|
|
13
|
-
# Build documentation in the doc/help/ directory with Sphinx
|
|
14
|
-
sphinx:
|
|
15
|
-
configuration: docs/conf.py
|
|
16
|
-
|
|
17
|
-
formats:
|
|
18
|
-
- pdf
|