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 = {
name: '@shipzone/npmci',
version: '4.1.15',
version: '4.1.16',
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
* @execution SYNC
*/
public static dockerFileVersion(dockerfileNameArg: string): string {
public static dockerFileVersion(dockerfileInstanceArg: Dockerfile, dockerfileNameArg: string): string {
let versionString: string;
const versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/;
const regexResultArray = versionRegex.exec(dockerfileNameArg);
@ -129,6 +129,10 @@ export class Dockerfile {
} else {
versionString = 'latest';
}
versionString.replace(
'##version##',
dockerfileInstanceArg.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo.npm.version
);
return versionString;
}
@ -233,7 +237,7 @@ export class Dockerfile {
this.npmciDockerManagerRef.npmciRef.npmciEnv.repo.user +
'/' +
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.buildTag = this.cleanTag;