From bc4f5902c3c9f632cd365fd43946061dcd8b4023 Mon Sep 17 00:00:00 2001 From: Nicolas Charpentier Date: Thu, 6 May 2021 11:03:34 +0100 Subject: [PATCH] fix: dry_run mode dry_run was not working from github. --- src/main.ts | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/main.ts b/src/main.ts index d5b9bd8e..56011099 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,31 +14,25 @@ import {Version} from './models' async function run(): Promise { try { - if (DRY_RUN !== undefined) { + if (DRY_RUN === 'ci' || DRY_RUN === 'true') { core.info(`email ${EMAIL}`) core.info(`project ${PROJECT}`) core.info(`subdomain ${SUBDOMAIN}`) core.info(`release ${RELEASE_NAME}`) core.info(`create ${CREATE}`) core.info(`tickets ${TICKETS}`) + } - if (DRY_RUN === 'true') { - const project = await Project.create( - EMAIL, - API_TOKEN, - PROJECT, - SUBDOMAIN - ) - core.info(`Project loaded ${project.project?.id}`) - const version = project.getVersion(RELEASE_NAME) + if (DRY_RUN === 'true') { + const project = await Project.create(EMAIL, API_TOKEN, PROJECT, SUBDOMAIN) + core.info(`Project loaded ${project.project?.id}`) + const version = project.getVersion(RELEASE_NAME) - if (version === undefined) { - core.info(`Version ${RELEASE_NAME} not found`) - } else { - core.info(`Version ${RELEASE_NAME} found`) - } + if (version === undefined) { + core.info(`Version ${RELEASE_NAME} not found`) + } else { + core.info(`Version ${RELEASE_NAME} found`) } - return }