opencode-codeops 1.7.0 → 1.7.1
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/scripts/release.mjs +18 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/scripts/release.mjs
CHANGED
|
@@ -327,6 +327,23 @@ function updateChangelog(version, commits) {
|
|
|
327
327
|
writeFileSync(path, mergeChangelog(existing, entry), "utf-8")
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Builds the `git tag` arguments for a release.
|
|
332
|
+
*
|
|
333
|
+
* The tag is annotated (`-a` with a message) because the release publishes tags
|
|
334
|
+
* with `git push --follow-tags`, which pushes only annotated tags. A lightweight
|
|
335
|
+
* tag would be created locally but never reach the remote, and the next release
|
|
336
|
+
* would then derive its version from a stale tag.
|
|
337
|
+
*
|
|
338
|
+
* @param version - Plain `x.y.z` version being tagged
|
|
339
|
+
* @returns Arguments for `git tag`
|
|
340
|
+
* @example
|
|
341
|
+
* tagArgs("1.2.3") // ["tag", "-a", "v1.2.3", "-m", "opencode-codeops v1.2.3"]
|
|
342
|
+
*/
|
|
343
|
+
export function tagArgs(version) {
|
|
344
|
+
return ["tag", "-a", `v${version}`, "-m", `opencode-codeops v${version}`]
|
|
345
|
+
}
|
|
346
|
+
|
|
330
347
|
/**
|
|
331
348
|
* Commits the version bump and creates the release tag.
|
|
332
349
|
*
|
|
@@ -340,7 +357,7 @@ function commitAndTag(version, { ci, noGitCommit }) {
|
|
|
340
357
|
|
|
341
358
|
run("git", ["add", "package.json", "package-lock.json", "CHANGELOG.md"])
|
|
342
359
|
run("git", ["commit", "-m", `chore(release): v${version}${ci ? " [skip ci]" : ""}`])
|
|
343
|
-
run("git",
|
|
360
|
+
run("git", tagArgs(version))
|
|
344
361
|
}
|
|
345
362
|
|
|
346
363
|
/**
|