From 8c5f3a80d4d81769b9797bed2ea7b6234feab5e3 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 20 Sep 2019 23:11:26 +0200 Subject: [PATCH] Check if already included --- lib/main.js | 4 +++- src/main.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index 52c57d6..3d60487 100644 --- a/lib/main.js +++ b/lib/main.js @@ -28,7 +28,9 @@ function run() { let snapshot = ''; if (!process.env.GITHUB_REF.startsWith('refs/tags/')) { console.log(`⚠️ No tag found. Snapshot forced`); - snapshot = ' --snapshot'; + if (!args.includes('--snapshot')) { + snapshot = ' --snapshot'; + } } else { console.log(`✅ ${process.env.GITHUB_REF.split('/')[2]}} tag found`); diff --git a/src/main.ts b/src/main.ts index 4da0fec..f3ff9d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,7 +11,9 @@ async function run() { let snapshot = ''; if (!process.env.GITHUB_REF!.startsWith('refs/tags/')) { console.log(`⚠️ No tag found. Snapshot forced`); - snapshot = ' --snapshot'; + if (!args.includes('--snapshot')) { + snapshot = ' --snapshot'; + } } else { console.log(`✅ ${process.env.GITHUB_REF!.split('/')[2]}} tag found`); }