Skip to content

Commit

Permalink
fix: dry_run mode
Browse files Browse the repository at this point in the history
dry_run was not working from github.
  • Loading branch information
charpi committed May 6, 2021
1 parent 0ca5836 commit bc4f590
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,25 @@ import {Version} from './models'

async function run(): Promise<void> {
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
}

Expand Down

0 comments on commit bc4f590

Please sign in to comment.