From ad69e54f1e33981b81ea7654055edf2c85afcd7e Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Wed, 27 Nov 2024 20:20:06 +0100 Subject: [PATCH] fix: include extended & with deploy in tool version for proper caching --- src/hugo.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/hugo.ts b/src/hugo.ts index 3a8281c..1d384db 100644 --- a/src/hugo.ts +++ b/src/hugo.ts @@ -41,12 +41,16 @@ export class HugoInstaller { const hugoBinName = this.platform.binaryName(Hugo.CmdName) const tmpDir = os.tmpdir() + let versionSpec = release.tag_name + if (cmd.extended) { + versionSpec += '+extended' + } + if (cmd.withDeploy) { + versionSpec += '+withdeploy' + } + try { - const cachedTool = tc.find( - Hugo.Name, - release.tag_name, - this.platform.arch - ) + const cachedTool = tc.find(Hugo.Name, versionSpec, this.platform.arch) if (cachedTool) { core.addPath(cachedTool) return @@ -81,7 +85,7 @@ export class HugoInstaller { path.join(tmpDir, hugoBinName), hugoBinName, Hugo.Name, - release.tag_name, + versionSpec, this.platform.arch )