config_tools: add document link for create scenario modal

add document link for create scenario modal

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
This commit is contained in:
Weiyi Feng 2022-06-17 09:54:52 +08:00 committed by acrnsi-robot
parent 4bfbab8d89
commit 044cf99422
2 changed files with 16 additions and 2 deletions

View File

@ -19,7 +19,8 @@
<div class="form-group pb-4"> <div class="form-group pb-4">
<p class="d-flex justify-content-between"> <p class="d-flex justify-content-between">
<b>Choose a scenario type:</b> <b>Choose a scenario type:</b>
<a class="fs-6" style="cursor: pointer"> <a class="fs-6"
:href="'https://projectacrn.github.io/'+version+'/introduction/index.html#static-configuration-based-on-scenarios'">
Learn about scenarios Learn about scenarios
</a> </a>
</p> </p>
@ -77,6 +78,7 @@ export default {
}, },
data() { data() {
return { return {
version: branchVersion,
scenarioTemplate: "shared", scenarioTemplate: "shared",
preLaunch: 1, preLaunch: 1,
postLaunch: 1 postLaunch: 1

View File

@ -5,9 +5,20 @@ import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import tauri from "./thirdLib/tauri-plugin"; import tauri from "./thirdLib/tauri-plugin";
let versionMatcher = /release_([\d.]+)/;
let branchVersion = child_process.execSync('git rev-parse --abbrev-ref HEAD').toString()
if (versionMatcher.test(branchVersion)) {
branchVersion = versionMatcher.exec(branchVersion)[1]
} else {
branchVersion = 'latest'
}
const packageVersion = child_process.execSync('git describe --dirty') const packageVersion = child_process.execSync('git describe --dirty')
console.log('branchVersion: ' + branchVersion)
console.log("packageVersion: " + packageVersion) console.log("packageVersion: " + packageVersion)
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
base: './', base: './',
@ -19,6 +30,7 @@ export default defineConfig({
outDir: path.resolve(__dirname, 'build') outDir: path.resolve(__dirname, 'build')
}, },
define: { define: {
packageVersion: JSON.stringify(packageVersion.toString()) packageVersion: JSON.stringify(packageVersion.toString()),
branchVersion
} }
}) })