Skip to content

Commit

Permalink
addZ
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jun 16, 2024
1 parent 65b742b commit ce756dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/bot/src/nightly-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import { octokit, owner, repo } from "./util/octokit";

function addZ(n: number) {
return n < 10 ? "0" + n : "" + n;
}

async function main() {
// Default to the core version in packages/core/package.json
const coreVersion = require("../../../packages/core/package.json").version;
Expand All @@ -18,7 +22,7 @@ async function main() {
const month = date.getMonth() + 1;
const day = date.getDate();

const datePart = `${year}.${month}.${day}`;
const datePart = `${year}${addZ(month)}.${addZ(day)}`;

const base = `${version}-nightly-${datePart}`;
let idx = 1;
Expand Down

0 comments on commit ce756dc

Please sign in to comment.