fix(build): replace app with package in version data
This commit is contained in:
parent
c528e523a2
commit
c76781b113
|
@ -51,13 +51,13 @@ const bundle = {
|
|||
replace({
|
||||
delimiters: ['{{ ', ' }}'],
|
||||
values: {
|
||||
APP_NAME: metadata.name,
|
||||
APP_VERSION: metadata.version,
|
||||
BUILD_JOB: process.env['CI_JOB_ID'],
|
||||
BUILD_RUNNER: process.env['CI_RUNNER_DESCRIPTION'],
|
||||
GIT_BRANCH: process.env['CI_COMMIT_REF_SLUG'],
|
||||
GIT_COMMIT: process.env['CI_COMMIT_SHA'],
|
||||
NODE_VERSION: process.env['NODE_VERSION'],
|
||||
PACKAGE_NAME: metadata.name,
|
||||
PACKAGE_VERSION: metadata.version,
|
||||
},
|
||||
}),
|
||||
resolve({
|
||||
|
|
|
@ -104,7 +104,6 @@
|
|||
"no-submodule-imports": false,
|
||||
"no-unbound-method": true,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"no-void-expression": true,
|
||||
"prefer-conditional-expression": false,
|
||||
|
|
|
@ -85,7 +85,7 @@ export function parseArgs(argv: Array<string>): ParseResults {
|
|||
},
|
||||
})
|
||||
.option(CONFIG_ARGS_NAME, {
|
||||
default: `.${VERSION_INFO.app.name}.yml`,
|
||||
default: `.${VERSION_INFO.package.name}.yml`,
|
||||
group: 'Config:',
|
||||
type: 'string',
|
||||
})
|
||||
|
@ -131,7 +131,7 @@ export function parseArgs(argv: Array<string>): ParseResults {
|
|||
alias: ['t', 'tag'],
|
||||
})
|
||||
.help()
|
||||
.version(VERSION_INFO.app.version)
|
||||
.version(VERSION_INFO.package.version)
|
||||
.alias('version', 'v');
|
||||
|
||||
// @TODO: this should not need a cast but argv's type only has the last option (include-tag)
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
export const VERSION_INFO = {
|
||||
app: {
|
||||
name: '{{ APP_NAME }}',
|
||||
version: '{{ APP_VERSION }}',
|
||||
},
|
||||
build: {
|
||||
job: '{{ BUILD_JOB }}',
|
||||
node: '{{ NODE_VERSION }}',
|
||||
|
@ -12,4 +8,8 @@ export const VERSION_INFO = {
|
|||
branch: '{{ GIT_BRANCH }}',
|
||||
commit: '{{ GIT_COMMIT }}',
|
||||
},
|
||||
package: {
|
||||
name: '{{ PACKAGE_NAME }}',
|
||||
version: '{{ PACKAGE_VERSION }}',
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue