@opndev/rzilla 0.0.1 → 0.0.2
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/Changes +5 -1
- package/lib/cmd/release.mjs +12 -3
- package/package.json +1 -1
package/Changes
CHANGED
package/lib/cmd/release.mjs
CHANGED
|
@@ -214,6 +214,9 @@ export async function runRelease(opts = {}) {
|
|
|
214
214
|
const files = asArray(g.files ?? "lib/**/*.{mjs,cjs,js}");
|
|
215
215
|
const include = asArray(g.include ?? []);
|
|
216
216
|
|
|
217
|
+
// Ensure the release changelog is present in the publish artifact.
|
|
218
|
+
if (!include.includes(changesPath)) include.push(changesPath);
|
|
219
|
+
|
|
217
220
|
await populateBuildDir({ buildDir, files, include, binDirs });
|
|
218
221
|
}
|
|
219
222
|
|
|
@@ -226,10 +229,16 @@ export async function runRelease(opts = {}) {
|
|
|
226
229
|
}
|
|
227
230
|
|
|
228
231
|
async function commitAndTagRelease() {
|
|
229
|
-
//
|
|
230
|
-
|
|
232
|
+
// Finalize Changes IN the build artifact, then copy it back to the repo
|
|
233
|
+
// so the commit/tag matches exactly what we publish.
|
|
234
|
+
const buildChangesPath = path.join(build.currentPath, changesPath);
|
|
235
|
+
|
|
236
|
+
const changesBefore = await readChanges(buildChangesPath);
|
|
231
237
|
const releasedChanges = finalizeNextToVersion(changesBefore, version);
|
|
232
|
-
await writeChanges(
|
|
238
|
+
await writeChanges(buildChangesPath, releasedChanges);
|
|
239
|
+
|
|
240
|
+
// Copy finalized Changes back to repo working tree
|
|
241
|
+
await fs.copyFile(buildChangesPath, changesPath);
|
|
233
242
|
|
|
234
243
|
await sh("git", ["add", changesPath], { inherit: true });
|
|
235
244
|
await sh("git", ["commit", "-m", `Release ${version}`], { inherit: true });
|
package/package.json
CHANGED