Use same version number for server and webapp, add CI check

- Check webapp and server have same version number
- Use `genversion` on build to create javascript file with version string
from pyproject.toml
- Expose the version number in the js interface
- Correct format of current of alpha version string because javascript complains

Closes #382
This commit is contained in:
Julian Stirling 2025-06-09 12:08:31 +01:00
parent 24b6eb74a1
commit c79184a6d9
8 changed files with 267 additions and 9 deletions

View file

@ -25,7 +25,7 @@
<div>
<b>Server Version:</b> <br />
V3 (pre-alpha)
v{{ app_version() }}
</div>
<hr />

View file

@ -11,6 +11,7 @@ require("vue-tour/dist/vue-tour.css");
// Import MD icons
import "material-symbols/outlined.css";
import version from './version.js'
// UIKit overrides
UIkit.mixin(
@ -35,6 +36,9 @@ Vue.config.productionTip = false;
Vue.mixin({
methods: {
app_version() {
return version;
},
thingDescription(thing) {
return this.$store.getters["wot/thingDescription"](thing);
},