添加IDEVersion字段显示版本号,设置版本号为10.0.1,在about页面和系统命令行显示kylin-code版本,同时修改打包中的control文件中版本号.
This commit is contained in:
parent
de62d28c72
commit
3ca96d06bc
|
@ -80,7 +80,7 @@ function prepareDebPackage(arch) {
|
|||
const that = this;
|
||||
gulp.src('resources/linux/debian/control.template', { base: '.' })
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
|
||||
.pipe(replace('@@VERSION@@', packageJson.IDEVersion + '-' + linuxPackageRevision))
|
||||
.pipe(replace('@@ARCHITECTURE@@', debArch))
|
||||
.pipe(replace('@@INSTALLEDSIZE@@', Math.ceil(size / 1024)))
|
||||
.pipe(rename('DEBIAN/control'))
|
||||
|
@ -183,7 +183,7 @@ function prepareRpmPackage(arch) {
|
|||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@NAME_LONG@@', IdeName))
|
||||
.pipe(replace('@@ICON@@', product.linuxIconName))
|
||||
.pipe(replace('@@VERSION@@', packageJson.version))
|
||||
.pipe(replace('@@VERSION@@', packageJson.IDEVersion))
|
||||
.pipe(replace('@@RELEASE@@', linuxPackageRevision))
|
||||
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
|
||||
.pipe(replace('@@LICENSE@@', product.licenseName))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"IDEVersion": "10.0.1",
|
||||
"version": "1.68.0",
|
||||
"distro": "2966cd72fc1a3a5fb89bf2d85a1a66e56206961a",
|
||||
"author": {
|
||||
|
|
|
@ -31,6 +31,7 @@ export type ExtensionVirtualWorkspaceSupport = {
|
|||
};
|
||||
|
||||
export interface IProductConfiguration {
|
||||
readonly IDEVersion: string;
|
||||
readonly version: string;
|
||||
readonly date?: string;
|
||||
readonly quality?: string;
|
||||
|
|
|
@ -51,12 +51,12 @@ export async function main(argv: string[]): Promise<any> {
|
|||
// Help
|
||||
if (args.help) {
|
||||
const executable = `${product.applicationName}${isWindows ? '.exe' : ''}`;
|
||||
console.log(buildHelpMessage(product.nameLong, executable, product.version, OPTIONS));
|
||||
console.log(buildHelpMessage(product.nameLong, executable, product.IDEVersion, OPTIONS));
|
||||
}
|
||||
|
||||
// Version Info
|
||||
else if (args.version) {
|
||||
console.log(buildVersionMessage(product.version, product.commit));
|
||||
console.log(buildVersionMessage(product.IDEVersion, product.commit));
|
||||
}
|
||||
|
||||
// Extensions Management
|
||||
|
|
|
@ -32,7 +32,7 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
|||
const rootPath = dirname(FileAccess.asFileUri('', require));
|
||||
|
||||
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
|
||||
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
|
||||
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { IDEVersion: string; version: string };
|
||||
|
||||
// Running out of sources
|
||||
if (env['VSCODE_DEV']) {
|
||||
|
@ -45,6 +45,7 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
|||
}
|
||||
|
||||
Object.assign(product, {
|
||||
IDEVersion: pkg.IDEVersion,
|
||||
version: pkg.version
|
||||
});
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ export class BrowserDialogHandler implements IDialogHandler {
|
|||
const detailString = (useAgo: boolean): string => {
|
||||
return localize('aboutDetail',
|
||||
"Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
|
||||
this.productService.version || 'Unknown',
|
||||
this.productService.IDEVersion || 'Unknown',
|
||||
this.productService.commit || 'Unknown',
|
||||
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
|
||||
navigator.userAgent
|
||||
|
|
|
@ -156,7 +156,7 @@ export class NativeDialogHandler implements IDialogHandler {
|
|||
}
|
||||
|
||||
async about(): Promise<void> {
|
||||
let version = this.productService.version;
|
||||
let version = this.productService.IDEVersion;
|
||||
if (this.productService.target) {
|
||||
version = `${version} (${this.productService.target} setup)`;
|
||||
} else if (this.productService.darwinUniversalAssetId) {
|
||||
|
|
Loading…
Reference in New Issue