Skip to content

Commit

Permalink
set default for ref parameter to replace task so it doesn't try to re…
Browse files Browse the repository at this point in the history
…format the whole function
  • Loading branch information
mojavelinux committed Nov 17, 2023
1 parent fcb49f7 commit 283cc8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gulp.d/tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ function addVersionEntry (file, tagName, contents = Buffer.alloc(0)) {
return file
}

module.exports = (dest, bundleName, owner, repo, ref = 'refs/heads/main', token, updateBranch) => async () => {
module.exports = (dest, bundleName, owner, repo, ref, token, updateBranch) => async () => {
const octokit = new Octokit({ auth: `token ${token}` })
let variant = ref.replace(/^refs\/heads\//, '')
let variant = ref ? ref.replace(/^refs\/heads\//, '') : 'main'
if (variant === 'main') variant = 'prod'
ref = ref.replace(/^refs\//, '')
const tagName = `${variant}-${await getNextReleaseNumber({ octokit, owner, repo, variant })}`
Expand Down

0 comments on commit 283cc8f

Please sign in to comment.