@dbx-tools/projen 0.9.36 → 0.9.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +1 -1
- package/package.json +4 -4
- package/src/release.ts +1 -41
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Hand edits are overwritten on the next watch; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/projen";
|
|
6
|
-
export const PACKAGE_VERSION = "0.9.
|
|
6
|
+
export const PACKAGE_VERSION = "0.9.38";
|
|
7
7
|
export * as barrels from "./src/barrels.ts";
|
|
8
8
|
export * as bunApp from "./src/bun-app.ts";
|
|
9
9
|
export * as bunWorkflow from "./src/bun-workflow.ts";
|
package/package.json
CHANGED
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@clack/prompts": "^1.7.0",
|
|
35
|
-
"@dbx-tools/core": "^0.9.
|
|
36
|
-
"@dbx-tools/path": "^0.9.
|
|
37
|
-
"@dbx-tools/shared-core": "^0.9.
|
|
35
|
+
"@dbx-tools/core": "^0.9.38",
|
|
36
|
+
"@dbx-tools/path": "^0.9.38",
|
|
37
|
+
"@dbx-tools/shared-core": "^0.9.38",
|
|
38
38
|
"commander": "^15.0.0",
|
|
39
39
|
"concurrently": "^10.0.3",
|
|
40
40
|
"constructs": "^10.6.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"main": "index.ts",
|
|
58
58
|
"license": "Apache-2.0",
|
|
59
|
-
"version": "0.9.
|
|
59
|
+
"version": "0.9.38",
|
|
60
60
|
"types": "index.ts",
|
|
61
61
|
"type": "module",
|
|
62
62
|
"exports": {
|
package/src/release.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { GithubWorkflow } from "projen/lib/github";
|
|
|
5
5
|
import { JobPermission, type Job, type JobStep } from "projen/lib/github/workflows-model";
|
|
6
6
|
import { BUN_VERSION } from "./bun-workflow.ts";
|
|
7
7
|
import { projectReleaseBranch, taskCommand, type DBXToolsJavaScriptProject } from "./project-js.ts";
|
|
8
|
-
import {
|
|
8
|
+
import { RELEASE_VERSION, releaseSourceSteps } from "./release-context.ts";
|
|
9
9
|
|
|
10
10
|
const NODE_VERSION = "24";
|
|
11
11
|
const NPM_VERSION = "11.4.2";
|
|
@@ -98,53 +98,14 @@ function refreshDocsRegistryDependencies(workflow: GithubWorkflow): void {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
function refreshGitHubReleaseDependencies(workflow: GithubWorkflow): void {
|
|
102
|
-
const release = workflow.getJob("publish-github-release") as Job | undefined;
|
|
103
|
-
if (!release) return;
|
|
104
|
-
const registryJobs = Object.keys(workflow.jobs).filter(
|
|
105
|
-
(name) => name === "publish-node" || name.startsWith("publish-pypi-"),
|
|
106
|
-
);
|
|
107
|
-
const needs = ["verify-context", ...registryJobs];
|
|
108
|
-
workflow.updateJob("publish-github-release", {
|
|
109
|
-
...release,
|
|
110
|
-
needs,
|
|
111
|
-
if: releaseCondition([
|
|
112
|
-
"needs.verify-context.result == 'success'",
|
|
113
|
-
...registryJobs.map((job) => `needs['${job}'].result == 'success'`),
|
|
114
|
-
]),
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
101
|
/** Keep documentation publication behind every configured package registry. */
|
|
119
102
|
export function refreshReleaseDocsDependencies(project: DBXToolsJavaScriptProject): void {
|
|
120
103
|
const workflow = releaseWorkflows.get(project);
|
|
121
104
|
if (workflow) {
|
|
122
105
|
refreshDocsRegistryDependencies(workflow);
|
|
123
|
-
refreshGitHubReleaseDependencies(workflow);
|
|
124
106
|
}
|
|
125
107
|
}
|
|
126
108
|
|
|
127
|
-
function githubReleaseJob(): Job {
|
|
128
|
-
return {
|
|
129
|
-
runsOn: ["ubuntu-latest"],
|
|
130
|
-
permissions: { contents: JobPermission.WRITE },
|
|
131
|
-
timeoutMinutes: 10,
|
|
132
|
-
env: {
|
|
133
|
-
GH_TOKEN: "${{ github.token }}",
|
|
134
|
-
RELEASE_TAG,
|
|
135
|
-
},
|
|
136
|
-
steps: [
|
|
137
|
-
{
|
|
138
|
-
name: "Create GitHub release",
|
|
139
|
-
run: [
|
|
140
|
-
'gh release view "$RELEASE_TAG" >/dev/null 2>&1 ||',
|
|
141
|
-
' gh release create "$RELEASE_TAG" --verify-tag --title "$RELEASE_TAG" --generate-notes',
|
|
142
|
-
].join("\n"),
|
|
143
|
-
},
|
|
144
|
-
],
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
|
|
148
109
|
function verifyContextJob(
|
|
149
110
|
project: DBXToolsJavaScriptProject,
|
|
150
111
|
tagPrefix: string,
|
|
@@ -336,7 +297,6 @@ export class DBXToolsRelease extends Component {
|
|
|
336
297
|
if (options.docs) {
|
|
337
298
|
addDocsJobs(workflow, project, options.docs);
|
|
338
299
|
}
|
|
339
|
-
workflow.addJob("publish-github-release", githubReleaseJob());
|
|
340
300
|
refreshReleaseDocsDependencies(project);
|
|
341
301
|
}
|
|
342
302
|
}
|