[supervisor-frontend] add version commit

This commit is contained in:
Pudong Zheng 2022-09-15 06:36:25 +00:00 committed by Robo Quat
parent 3364a06b1e
commit fc9a936a27
3 changed files with 11 additions and 1 deletions

View File

@ -4,6 +4,7 @@ packages:
srcs:
- "src/**"
- "public/**"
- config.json
- package.json
- webpack.config.js
- tsconfig.json
@ -14,3 +15,8 @@ packages:
config:
dontTest: true
yarnLock: ${coreYarnLockBase}/../yarn.lock
commands:
build:
- sh
- -c
- yq w -i config.json commit commit-${__git_commit} -j && yarn build

View File

@ -0,0 +1,3 @@
{
"commit": "<this value will insert by leeway before running tsc/webpack>"
}

View File

@ -6,6 +6,7 @@
import { serverUrl, workspaceUrl } from '../shared/urls';
import { GitpodServiceClient } from './gitpod-service-client';
const commit = require('../../config.json').commit
export enum MetricsName {
SupervisorFrontendClientTotal = "gitpod_supervisor_frontend_client_total",
@ -67,7 +68,7 @@ export class IDEMetricsServiceClient {
const params: ReportErrorParam = {
errorStack: error.stack ?? String(error),
component: "supervisor-frontend",
version: "unknown",
version: commit,
workspaceId: this.workspaceId ?? "",
instanceId: this.instanceId ?? "",
userId: this.userId ?? "",