Skip to content

Commit

Permalink
Include git commit into metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Nov 6, 2024
1 parent 9c5c1ad commit 868b43b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lizmap/modules/lizmap/lib/Server/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ private function getLizmapMetadata()
$data['info'] = array();
$data['info']['version'] = $projectInfos->version;
$data['info']['date'] = $projectInfos->versionDate;
$data['info']['commit'] = \jApp::config()->commitSha;

$jelixVersion = \jFramework::version();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ describe('Request JSON metadata', function () {
expect(response.status).to.eq(200);
expect(response.headers['content-type']).to.eq('application/json');

// LWC Metadata
expect(response.body.info.version).to.exist;
expect(response.body.info.date).to.exist;
expect(response.body.info.commit).to.exist;

// QGIS Server info
expect(response.body.qgis_server_info.py_qgis_server.found).to.eq(true)
expect(response.body.qgis_server_info.py_qgis_server.version).to.match(/\.|n\/a/i)
expect(response.body.qgis_server_info.metadata.version).to.contain('3.')
Expand Down

0 comments on commit 868b43b

Please sign in to comment.