From 1060060366d4cb41f6798201f86545c92654735d Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sat, 1 Jul 2023 19:02:06 +0200 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/manager.docker/mod.classes.dockerfile.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index d427598..ee3c33a 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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' } diff --git a/ts/manager.docker/mod.classes.dockerfile.ts b/ts/manager.docker/mod.classes.dockerfile.ts index 7455460..0c2c032 100644 --- a/ts/manager.docker/mod.classes.dockerfile.ts +++ b/ts/manager.docker/mod.classes.dockerfile.ts @@ -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;