misc: configurator: Use more precise acrn version identifier

Display acrn version string from `git describe --dirty` at UI footer to
help testing. Append the same version to deb package name as well.

Tracked-On: #7488
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
This commit is contained in:
Calvin Zhang
2022-05-16 15:59:34 +08:00
committed by acrnsi-robot
parent 14ab083cc8
commit c7a797ac51
4 changed files with 23 additions and 16 deletions

View File

@@ -19,21 +19,16 @@ export default {
}
},
mounted() {
this.getAppVersion()
this.version = packageVersion
},
methods: {
home() {
this.$router.push('/')
},
getAppVersion() {
getVersion().then((version) => {
this.version = version
})
}
}
}
</script>
<style scoped>
</style>
</style>

View File

@@ -1,9 +1,13 @@
import path from "path";
import child_process from "child_process"
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import tauri from "./thirdLib/tauri-plugin";
const packageVersion = child_process.execSync('git describe --dirty')
console.log("packageVersion: " + packageVersion)
// https://vitejs.dev/config/
export default defineConfig({
base: './',
@@ -13,5 +17,8 @@ export default defineConfig({
},
build: {
outDir: path.resolve(__dirname, 'build')
},
define: {
packageVersion: JSON.stringify(packageVersion.toString())
}
})