From 31068deeb7f4002b25409a4cef8bf442374d5c37 Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Sat, 16 Jul 2022 09:50:05 +0200 Subject: [PATCH] Print interpolated assets (fixes #898) --- lib/plugin/github/GitHub.js | 6 +++--- lib/plugin/gitlab/GitLab.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/plugin/github/GitHub.js b/lib/plugin/github/GitHub.js index cfc1eb86..997c90ea 100644 --- a/lib/plugin/github/GitHub.js +++ b/lib/plugin/github/GitHub.js @@ -280,14 +280,14 @@ class GitHub extends Release { const context = this.config.getContext(); const { isDryRun } = this.config; - this.log.exec('octokit repos.uploadReleaseAssets', assets, { isDryRun }); + const patterns = _.castArray(assets).map(pattern => format(pattern, context)); + + this.log.exec('octokit repos.uploadReleaseAssets', patterns, { isDryRun }); if (!assets || !isReleased || isDryRun) { return true; } - const patterns = _.castArray(assets).map(pattern => format(pattern, context)); - return globby(patterns).then(files => { if (!files.length) { this.log.warn(`octokit repos.uploadReleaseAssets: did not find "${assets}" relative to ${process.cwd()}`); diff --git a/lib/plugin/gitlab/GitLab.js b/lib/plugin/gitlab/GitLab.js index 0097701c..fac51ba6 100644 --- a/lib/plugin/gitlab/GitLab.js +++ b/lib/plugin/gitlab/GitLab.js @@ -253,14 +253,14 @@ class GitLab extends Release { const { isDryRun } = this.config; const context = this.config.getContext(); - this.log.exec('gitlab releases#uploadAssets', assets, { isDryRun }); + const patterns = _.castArray(assets).map(pattern => format(pattern, context)); + + this.log.exec('gitlab releases#uploadAssets', patterns, { isDryRun }); if (!assets || isDryRun) { return noop; } - const patterns = _.castArray(assets).map(pattern => format(pattern, context)); - return globby(patterns).then(files => { if (!files.length) { this.log.warn(`gitlab releases#uploadAssets: could not find "${assets}" relative to ${process.cwd()}`);