-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { execSync } from "child_process"; | ||
|
||
// generate nightly version | ||
const dateString = | ||
new Date().getFullYear() + | ||
String(new Date().getMonth() + 1).padStart(2, "0") + | ||
String(new Date().getDate()).padStart(2, "0"); | ||
|
||
const gitHash = execSync("git rev-parse --short HEAD").toString().trim(); | ||
|
||
const nightlyVersion = `2.0.0-nightly.${dateString}.${gitHash}`; | ||
|
||
execSync(`npx changeset version --snapshot nightly --no-snap-release`, { | ||
stdio: "inherit", | ||
}); | ||
|
||
execSync(`pnpm --filter "../packages/cli" --filter "../packages/core" version ${nightlyVersion} --no-git-tag-version`, { | ||
stdio: "inherit", | ||
}); | ||
|
||
execSync("pnpm install --no-frozen-lockfile", { stdio: "inherit" }); | ||
|
||
console.log(`Nightly version bump completed. Version: ${nightlyVersion}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { execSync } from "child_process"; | ||
import { buildCli, buildCoreCjs, buildJsPlugins } from "./build.mjs"; | ||
|
||
// Generate nightly version number | ||
const dateString = | ||
new Date().getFullYear() + | ||
String(new Date().getMonth() + 1).padStart(2, "0") + | ||
String(new Date().getDate()).padStart(2, "0"); | ||
|
||
const gitHash = execSync("git rev-parse --short HEAD").toString().trim(); | ||
|
||
const nightlyVersion = `2.0.0-nightly.${dateString}.${gitHash}`; | ||
|
||
// Build node packages | ||
await buildCli(); | ||
await buildCoreCjs(); | ||
await buildJsPlugins(); | ||
|
||
// Set npm config to public access | ||
execSync("npm config set access public", { stdio: "inherit" }); | ||
|
||
// Update versions to nightly | ||
execSync(`npx changeset version --snapshot nightly --no-snap-release`, { | ||
stdio: "inherit", | ||
}); | ||
|
||
// Publish nightly packages | ||
execSync(`npx changeset publish --tag nightly`, { stdio: "inherit" }); | ||
|
||
console.log(`Nightly version ${nightlyVersion} published successfully.`); |