Skip to content

Commit

Permalink
chore(release): set suffix on edge release package version
Browse files Browse the repository at this point in the history
`garden version` on edge releases will now output something like
`0.12.24-edge-74c221ea5`.
  • Loading branch information
edvald committed Aug 12, 2021
1 parent d241d14 commit 1cfcdf6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/src/build-pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ async function buildBinaries(args: string[]) {
packageJson.dependencies[depName] = "file:" + relPath
}

if (version === "edge") {
const gitHash = await exec("git", ["rev-parse", "--short", "HEAD"])
packageJson.version = packageJson.version + "-edge-" + gitHash.stdout
console.log("Set package version to " + packageJson.version)
}

await writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2))

console.log(chalk.green(" ✓ " + name))
Expand Down

0 comments on commit 1cfcdf6

Please sign in to comment.