From 244ac19fbf4167075c607c64586d0061640f769a Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Fri, 14 Jan 2022 13:17:58 -0300 Subject: [PATCH 1/2] fix: should not force snapshot when nightly is set Signed-off-by: Carlos A Becker --- src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 02923b12..da30ee03 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import * as git from './git'; import * as installer from './installer'; import * as core from '@actions/core'; import * as exec from '@actions/exec'; -import {dirname} from 'path'; +import { dirname } from 'path'; async function run(): Promise { try { @@ -36,8 +36,8 @@ async function run(): Promise { let snapshot = ''; if (args.split(' ').indexOf('release') > -1) { if (isTagDirty) { - core.info(`No tag found for commit ${commit}. Snapshot forced`); - if (!args.includes('--snapshot')) { + if (!args.includes('--snapshot') && !args.includes('--nightly')) { + core.info(`No tag found for commit ${commit}. Snapshot forced`); snapshot = ' --snapshot'; } } else { From b0a5edbd73201bbd5dcb4da51ee631c0787b5894 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Fri, 14 Jan 2022 13:21:48 -0300 Subject: [PATCH 2/2] fix: build Signed-off-by: Carlos A Becker --- dist/index.js | 4 ++-- src/main.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 1a8a3567..5280f820 100644 --- a/dist/index.js +++ b/dist/index.js @@ -346,8 +346,8 @@ function run() { let snapshot = ''; if (args.split(' ').indexOf('release') > -1) { if (isTagDirty) { - core.info(`No tag found for commit ${commit}. Snapshot forced`); - if (!args.includes('--snapshot')) { + if (!args.includes('--snapshot') && !args.includes('--nightly')) { + core.info(`No tag found for commit ${commit}. Snapshot forced`); snapshot = ' --snapshot'; } } diff --git a/src/main.ts b/src/main.ts index da30ee03..e3a4f4b9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import * as git from './git'; import * as installer from './installer'; import * as core from '@actions/core'; import * as exec from '@actions/exec'; -import { dirname } from 'path'; +import {dirname} from 'path'; async function run(): Promise { try {