Skip to content

Commit

Permalink
chore: tweak manual release version
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed May 5, 2023
1 parent 8f416b6 commit b96f013
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/version-pr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ try {
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, "utf8"))

const sha8 = process.env.GITHUB_SHA.substring(0, 8)
const prNumber = process.env.PR_NUMBER || "manual"

const packageVersion = `0.0.0-pr.${prNumber}.${sha8}`
const prefix = "0.0.0-"
const pr = process.env.PR_NUMBER
const source = pr ? `pr.${pr}` : "manual"
const packageVersion = `${prefix}${source}.${sha8}`
packageJSON.version = packageVersion
core.setOutput("version", packageVersion)
fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON))
Expand Down

1 comment on commit b96f013

@vercel
Copy link

@vercel vercel bot commented on b96f013 May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.