fix(core): update

This commit is contained in:
Philipp Kunz 2023-07-01 19:02:06 +02:00
parent 0fa3a579f7
commit 1060060366
2 changed files with 7 additions and 3 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@shipzone/npmci', name: '@shipzone/npmci',
version: '4.1.15', version: '4.1.16',
description: 'node and docker in gitlab ci on steroids' description: 'node and docker in gitlab ci on steroids'
} }

View File

@ -120,7 +120,7 @@ export class Dockerfile {
* returns a version for a docker file * returns a version for a docker file
* @execution SYNC * @execution SYNC
*/ */
public static dockerFileVersion(dockerfileNameArg: string): string { public static dockerFileVersion(dockerfileInstanceArg: Dockerfile, dockerfileNameArg: string): string {
let versionString: string; let versionString: string;
const versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/; const versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/;
const regexResultArray = versionRegex.exec(dockerfileNameArg); const regexResultArray = versionRegex.exec(dockerfileNameArg);
@ -129,6 +129,10 @@ export class Dockerfile {
} else { } else {
versionString = 'latest'; versionString = 'latest';
} }
versionString.replace(
'##version##',
dockerfileInstanceArg.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo.npm.version
);
return versionString; return versionString;
} }
@ -233,7 +237,7 @@ export class Dockerfile {
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.user + this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.user +
'/' + '/' +
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.repo; this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.repo;
this.version = Dockerfile.dockerFileVersion(plugins.path.parse(options.filePath).base); this.version = Dockerfile.dockerFileVersion(this, plugins.path.parse(options.filePath).base);
this.cleanTag = this.repo + ':' + this.version; this.cleanTag = this.repo + ':' + this.version;
this.buildTag = this.cleanTag; this.buildTag = this.cleanTag;