mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-19 16:54:22 +01:00
ci: publish
This commit is contained in:
@@ -11,6 +11,7 @@ console.log("=== publishing ===\n")
|
|||||||
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
|
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
|
||||||
const version = await (async () => {
|
const version = await (async () => {
|
||||||
if (snapshot) return `0.0.0-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
|
if (snapshot) return `0.0.0-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
|
||||||
|
if (process.env["OPENCODE_VERSION"]) return process.env["OPENCODE_VERSION"]
|
||||||
const [major, minor, patch] = (await $`gh release list --limit 1 --json tagName --jq '.[0].tagName'`.text())
|
const [major, minor, patch] = (await $`gh release list --limit 1 --json tagName --jq '.[0].tagName'`.text())
|
||||||
.trim()
|
.trim()
|
||||||
.replace(/^v/, "")
|
.replace(/^v/, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user