mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
chore: release script should automatically figure out CLI crate dependencies (#13992)
This commit is contained in:
parent
f7ab41583e
commit
92bb251058
4 changed files with 10 additions and 33 deletions
|
@ -12,7 +12,7 @@ const originalCliVersion = cliCrate.version;
|
|||
await cliCrate.promptAndIncrement();
|
||||
|
||||
// increment the dependency crate versions
|
||||
for (const crate of workspace.getDependencyCrates()) {
|
||||
for (const crate of workspace.getCliDependencyCrates()) {
|
||||
await crate.increment("minor");
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@ import { getCratesPublishOrder } from "./deps.ts";
|
|||
const workspace = await DenoWorkspace.load();
|
||||
const cliCrate = workspace.getCliCrate();
|
||||
|
||||
const dependencyCrates = getCratesPublishOrder(workspace.getDependencyCrates());
|
||||
const dependencyCrates = getCratesPublishOrder(
|
||||
workspace.getCliDependencyCrates(),
|
||||
);
|
||||
|
||||
try {
|
||||
for (const [i, crate] of dependencyCrates.entries()) {
|
||||
|
|
|
@ -28,42 +28,17 @@ export class DenoWorkspace {
|
|||
return this.#repo.crates;
|
||||
}
|
||||
|
||||
/** Gets the dependency crates used for the first part of the release process. */
|
||||
getDependencyCrates() {
|
||||
return [
|
||||
this.getBenchUtilCrate(),
|
||||
this.getSerdeV8Crate(),
|
||||
this.getCoreCrate(),
|
||||
...this.getExtCrates(),
|
||||
this.getRuntimeCrate(),
|
||||
];
|
||||
}
|
||||
|
||||
getSerdeV8Crate() {
|
||||
return this.getCrate("serde_v8");
|
||||
/** Gets the CLI dependency crates that should be published. */
|
||||
getCliDependencyCrates() {
|
||||
return this.getCliCrate()
|
||||
.descendantDependenciesInRepo()
|
||||
.filter((c) => c.name !== "test_util");
|
||||
}
|
||||
|
||||
getCliCrate() {
|
||||
return this.getCrate("deno");
|
||||
}
|
||||
|
||||
getCoreCrate() {
|
||||
return this.getCrate("deno_core");
|
||||
}
|
||||
|
||||
getRuntimeCrate() {
|
||||
return this.getCrate("deno_runtime");
|
||||
}
|
||||
|
||||
getBenchUtilCrate() {
|
||||
return this.getCrate("deno_bench_util");
|
||||
}
|
||||
|
||||
getExtCrates() {
|
||||
const extPath = path.join(this.#repo.folderPath, "ext");
|
||||
return this.crates.filter((c) => c.manifestPath.startsWith(extPath));
|
||||
}
|
||||
|
||||
getCrate(name: string) {
|
||||
return this.#repo.getCrate(name);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
export * from "https://raw.githubusercontent.com/denoland/automation/0.4.0/mod.ts";
|
||||
export * from "https://raw.githubusercontent.com/denoland/automation/0.5.0/mod.ts";
|
||||
|
|
Loading…
Reference in a new issue