-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skosmos version not showing in Docker install #1202
Comments
Thanks for the report. The Skosmos version is currently extracted from Git version tags, but these are not available when running under Docker. There should be another way of determining the Skosmos version. |
Maybe we can include the version when building the image. Can't recall if there's an option to read the version from a static source, but if not it might require some little tweaking in the code. |
Ok thank you for your answers, it is not a big deal, I was just wondering why it wasn't showing. |
Now the mechanism appears to be broken also without Docker: https://finto.fi/en/about |
I think we need something like bumpversion for Python projects, i.e. some way of keeping track of the Skosmos version number in a file that's accessible from PHP code. |
I wonder if we could use diff --git a/composer.json b/composer.json
index 1c3eafd8..ab866b5f 100644
--- a/composer.json
+++ b/composer.json
@@ -3,6 +3,7 @@
"description": "Thesaurus and controlled vocabulary browser using SKOS and SPARQL",
"type": "project",
"license": "MIT",
+ "version": "v2.15-dev",
"repositories": {
"lscache": {
"type": "package", Followed by diff --git a/model/Model.php b/model/Model.php
index e6f58f3a..e7a08181 100644
--- a/model/Model.php
+++ b/model/Model.php
@@ -76,10 +76,7 @@ class Model
*/
public function getVersion() : string
{
- $ver = null;
- if (file_exists('.git')) {
- $ver = rtrim(shell_exec('git describe --tags --always'));
- }
+ $ver = \Composer\InstalledVersions::getRootPackage()['pretty_version'];
if ($ver === null) {
return "unknown"; Results in: I found a few tools/libs123 to bump the Footnotes |
Great hints @kinow ! This looks like the correct and best way to do it.
This tool seems to be Node.js based, maybe not ideal since it requires that developers have a working Node environment which so far hasn't been a requirement for Skosmos development. This is from 2016 so may be outdated and unmaintained? This is also from 2016. Anyway we can do this manually as well if there's no suitable tool. We can just include it in the Release Process documentation. |
What steps will reproduce the problem?
What do you see?
In the Dockerfile, it is written
ARG SKOSMOS_VERSION=v.2.9
Is it the version used for the latest Docker install ?
The text was updated successfully, but these errors were encountered: