Skip to content

Commit

Permalink
👷 Added emojis for easier log debugging. Replace backticks where not …
Browse files Browse the repository at this point in the history
…needed
  • Loading branch information
mountainash authored Mar 11, 2024
1 parent 0423313 commit 6a2c977
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30984,11 +30984,11 @@ const core = __nccwpck_require__(2186)
const { spawn } = __nccwpck_require__(2081)

const execCmd = (command, args, cwd) => {
core.debug(`EXEC: "${ command } ${ args }" in ${ cwd || '.' }`)
core.info(`▶︎ EXEC: "${ command } ${ args }" in ${ cwd || '.' }`)
return new Promise((resolve, reject) => {
const process = spawn(command, args, { cwd })
let stdout
let stderr
let stdout = 'â–² '
let stderr = '🔺 '

process.stdout.on('data', (data) => {
core.debug(data.toString())
Expand Down Expand Up @@ -31111,7 +31111,7 @@ const init = () => {
const output = await exec('vercel', commandArguments, WORKING_DIRECTORY)
const parsed = output.match(/(?<=https?:\/\/)(.*)/g)[0]

if (!parsed) throw new Error('Could not parse deploymentUrl')
if (!parsed) throw new Error('🛑 Could not parse deploymentUrl')

deploymentUrl = parsed

Expand Down Expand Up @@ -31260,7 +31260,7 @@ const run = async () => {
}

try {
core.info(`Creating deployment with Vercel CLI`)
core.info('Creating deployment with Vercel CLI')
const vercel = Vercel.init()

const commit = ATTACH_COMMIT_METADATA ? await github.getCommit() : undefined
Expand All @@ -31270,10 +31270,10 @@ const run = async () => {

const deploymentUrls = []
if (IS_PR && PR_PREVIEW_DOMAIN) {
core.info(`Assigning custom preview domain to PR`)
core.info('Assigning custom preview domain to PR')

if (typeof PR_PREVIEW_DOMAIN !== 'string') {
throw new Error(`invalid type for PR_PREVIEW_DOMAIN`)
throw new Error('🛑 invalid type for PR_PREVIEW_DOMAIN')
}

const alias = PR_PREVIEW_DOMAIN.replace('{USER}', urlSafeParameter(USER))
Expand Down Expand Up @@ -31308,10 +31308,10 @@ const run = async () => {
}

if (ALIAS_DOMAINS) {
core.info(`Assigning custom domains to Vercel deployment`)
core.info('Assigning custom domains to Vercel deployment')

if (!Array.isArray(ALIAS_DOMAINS)) {
throw new Error(`invalid type for PR_PREVIEW_DOMAIN`)
throw new Error('🛑 invalid type for ALIAS_DOMAINS')
}

for (let i = 0; i < ALIAS_DOMAINS.length; i++) {
Expand Down
6 changes: 3 additions & 3 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ const core = require('@actions/core')
const { spawn } = require('child_process')

const execCmd = (command, args, cwd) => {
core.debug(`EXEC: "${ command } ${ args }" in ${ cwd || '.' }`)
core.info(`▶︎ EXEC: "${ command } ${ args }" in ${ cwd || '.' }`)
return new Promise((resolve, reject) => {
const process = spawn(command, args, { cwd })
let stdout
let stderr
let stdout = 'â–² '
let stderr = '🔺 '

process.stdout.on('data', (data) => {
core.debug(data.toString())
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const run = async () => {
}

try {
core.info(`Creating deployment with Vercel CLI`)
core.info('Creating deployment with Vercel CLI')
const vercel = Vercel.init()

const commit = ATTACH_COMMIT_METADATA ? await github.getCommit() : undefined
Expand All @@ -70,10 +70,10 @@ const run = async () => {

const deploymentUrls = []
if (IS_PR && PR_PREVIEW_DOMAIN) {
core.info(`Assigning custom preview domain to PR`)
core.info('Assigning custom preview domain to PR')

if (typeof PR_PREVIEW_DOMAIN !== 'string') {
throw new Error(`invalid type for PR_PREVIEW_DOMAIN`)
throw new Error('🛑 invalid type for PR_PREVIEW_DOMAIN')
}

const alias = PR_PREVIEW_DOMAIN.replace('{USER}', urlSafeParameter(USER))
Expand Down Expand Up @@ -108,10 +108,10 @@ const run = async () => {
}

if (ALIAS_DOMAINS) {
core.info(`Assigning custom domains to Vercel deployment`)
core.info('Assigning custom domains to Vercel deployment')

if (!Array.isArray(ALIAS_DOMAINS)) {
throw new Error(`invalid type for PR_PREVIEW_DOMAIN`)
throw new Error('🛑 invalid type for ALIAS_DOMAINS')
}

for (let i = 0; i < ALIAS_DOMAINS.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const init = () => {
const output = await exec('vercel', commandArguments, WORKING_DIRECTORY)
const parsed = output.match(/(?<=https?:\/\/)(.*)/g)[0]

if (!parsed) throw new Error('Could not parse deploymentUrl')
if (!parsed) throw new Error('🛑 Could not parse deploymentUrl')

deploymentUrl = parsed

Expand Down

0 comments on commit 6a2c977

Please sign in to comment.