1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore: release script should automatically figure out CLI crate dependencies (#13992)

This commit is contained in:
David Sherret 2022-03-16 20:33:14 -04:00 committed by GitHub
parent f7ab41583e
commit 92bb251058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 33 deletions

View file

@ -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");
}

View file

@ -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()) {

View file

@ -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);
}

View file

@ -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";