Skip to content

Commit

Permalink
ci: write version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed Dec 18, 2024
1 parent bb8791e commit ce8ed83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/tools/bump_versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const log = new Logger()

/** Bump packages version and print changelogs. */
if (import.meta.main) {
const { write } = parseArgs(Deno.args, { boolean: ["write"] })
const { "dry-run": dryrun } = parseArgs(Deno.args, { boolean: ["dry-run"] })

// Compute scopes
const scopes = [...await Array.fromAsync<{ name: string }>(Deno.readDir("@mizu"))]
Expand Down Expand Up @@ -44,7 +44,7 @@ if (import.meta.main) {
// Bump package versions
for (const scope of [...scopes, "internal", "render"]) {
log.with({ directive: scope }).debug("checking")
const { version, changelog } = git.changelog(`@mizu/${scope}/deno.jsonc`, { write, scopes: [scope, "internal", ...(scope === "render" ? render.scopes : [])] })
const { version, changelog } = git.changelog(`@mizu/${scope}/deno.jsonc`, { write: !dryrun, scopes: [scope, "internal", ...(scope === "render" ? render.scopes : [])] })
if (version.bump) {
changelog.split("\n").map((line) => log.with({ directive: scope }).info(line))
log.with({ directive: scope }).ok(`${semver.format(version.current)}${semver.format(version.next)}`)
Expand Down
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
},
"ci:bump-versions": {
"description": "Bump versions based on each package changes",
"command": "LOG_LEVEL=debug deno run --allow-read=@mizu --allow-write=$(deno task resolve:glob \"@mizu/**/deno.jsonc\") --allow-env --allow-run=git .github/tools/bump_versions.ts"
"command": "deno run --allow-read=@mizu --allow-write=$(deno task resolve:glob \"@mizu/**/deno.jsonc\") --allow-env --allow-run=git .github/tools/bump_versions.ts"
},
"ci:autogenerate": {
"description": "Autogenerate files",
Expand Down

0 comments on commit ce8ed83

Please sign in to comment.