@catladder/cli 5.0.0 → 5.0.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/dist/apps/cli/src/release/changesetsReleaseJob.js +3 -0
- package/dist/apps/cli/src/release/changesetsReleaseJob.js.map +1 -1
- package/dist/apps/cli/src/release/releaseEntry.d.ts +12 -0
- package/dist/apps/cli/src/release/releaseEntry.js +71 -0
- package/dist/apps/cli/src/release/releaseEntry.js.map +1 -0
- package/dist/bundles/catci/index.js +4 -4
- package/dist/bundles/runner-images/semantic-release/Dockerfile +1 -0
- package/dist/bundles/runner-images/semantic-release/scripts/semanticRelease +14 -4
- package/dist/bundles/skills/catladder-releases/SKILL.md +16 -2
- package/dist/runner-images/semantic-release/Dockerfile +1 -0
- package/dist/runner-images/semantic-release/scripts/semanticRelease +14 -4
- package/dist/skills/catladder-releases/SKILL.md +16 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/release/__tests__/releaseEntry.test.ts +88 -0
- package/src/release/changesetsReleaseJob.ts +3 -0
- package/src/release/releaseEntry.ts +86 -0
|
@@ -40,10 +40,20 @@ fi
|
|
|
40
40
|
echo "doing semantic release"
|
|
41
41
|
|
|
42
42
|
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
|
43
|
-
# the
|
|
44
|
-
#
|
|
45
|
-
# is
|
|
46
|
-
|
|
43
|
+
# the github counterpart of the gitlab plugin below: it creates the
|
|
44
|
+
# entry on the releases page with the generated notes. Everything
|
|
45
|
+
# beyond that is switched off on purpose — commenting on the
|
|
46
|
+
# pull requests/issues of a release and labelling them would need
|
|
47
|
+
# `issues: write` / `pull-requests: write` on the release job, which
|
|
48
|
+
# only exists to release.
|
|
49
|
+
PUBLISH_PLUGIN=',
|
|
50
|
+
["@semantic-release/github", {
|
|
51
|
+
"successComment": false,
|
|
52
|
+
"failComment": false,
|
|
53
|
+
"failTitle": false,
|
|
54
|
+
"labels": false,
|
|
55
|
+
"releasedLabels": false
|
|
56
|
+
}]'
|
|
47
57
|
else
|
|
48
58
|
# no gitlabUrl: the plugin derives it from the CI-provided variables
|
|
49
59
|
# of the running instance. It used to be hardcoded to panter's gitlab,
|
|
@@ -52,6 +52,11 @@ workflows the same way (`▶️ catladder deploy`, `⏹️ catladder stop`,
|
|
|
52
52
|
|
|
53
53
|
## `method` — how the version is decided
|
|
54
54
|
|
|
55
|
+
Whichever method runs, the release ends the same way: a `vX.Y.Z` tag, a
|
|
56
|
+
`CHANGELOG.md` entry, a `chore(release): <version>` commit, and an
|
|
57
|
+
entry on the releases page of the git host (gitlab `/-/releases`,
|
|
58
|
+
github `/releases`) carrying the release notes.
|
|
59
|
+
|
|
55
60
|
### `semantic-release` (default)
|
|
56
61
|
The version is derived automatically from **conventional commit
|
|
57
62
|
messages** since the last release (`fix:` → patch, `feat:` → minor,
|
|
@@ -63,8 +68,10 @@ Developers declare changes intentionally as **`.changeset/*.md` files**
|
|
|
63
68
|
(the official changesets format: a bump type + a human-written summary).
|
|
64
69
|
The release job consumes all pending changesets, takes the highest bump,
|
|
65
70
|
computes the next version from the last `v*` git tag, writes the
|
|
66
|
-
changelog, commits `chore(release): <version>`,
|
|
67
|
-
|
|
71
|
+
changelog, commits `chore(release): <version>`, pushes the tag and
|
|
72
|
+
creates the release entry on the git host (gitlab `/-/releases`,
|
|
73
|
+
github `/releases`) with the changelog as its description. An empty
|
|
74
|
+
`.changeset/` folder means there is nothing to release.
|
|
68
75
|
|
|
69
76
|
Add a changeset by creating `.changeset/<name>.md`:
|
|
70
77
|
|
|
@@ -121,6 +128,13 @@ the `security` commands in the `catladder-cli` reference.
|
|
|
121
128
|
MR adding a changeset describing the accumulated work.
|
|
122
129
|
- Wrong version bump → check commit types (semantic-release) or the bump
|
|
123
130
|
levels in the changeset files (changesets).
|
|
131
|
+
- Tag pushed but nothing on the releases page → with `changesets` the
|
|
132
|
+
entry is created via the host api after the push and never fails the
|
|
133
|
+
job (the release itself is done); look for the `could not create the
|
|
134
|
+
release entry` warning at the end of the release job log. On gitlab
|
|
135
|
+
it needs `GL_TOKEN` (`catladder project renew-token`). Releases
|
|
136
|
+
tagged before catladder created entries have none — that is not fixed
|
|
137
|
+
retroactively, create them by hand from the tag.
|
|
124
138
|
- Inspect the job with `yarn catladder project ci job-log` (see the
|
|
125
139
|
`catladder-cli` skill).
|
|
126
140
|
|
|
@@ -40,10 +40,20 @@ fi
|
|
|
40
40
|
echo "doing semantic release"
|
|
41
41
|
|
|
42
42
|
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
|
43
|
-
# the
|
|
44
|
-
#
|
|
45
|
-
# is
|
|
46
|
-
|
|
43
|
+
# the github counterpart of the gitlab plugin below: it creates the
|
|
44
|
+
# entry on the releases page with the generated notes. Everything
|
|
45
|
+
# beyond that is switched off on purpose — commenting on the
|
|
46
|
+
# pull requests/issues of a release and labelling them would need
|
|
47
|
+
# `issues: write` / `pull-requests: write` on the release job, which
|
|
48
|
+
# only exists to release.
|
|
49
|
+
PUBLISH_PLUGIN=',
|
|
50
|
+
["@semantic-release/github", {
|
|
51
|
+
"successComment": false,
|
|
52
|
+
"failComment": false,
|
|
53
|
+
"failTitle": false,
|
|
54
|
+
"labels": false,
|
|
55
|
+
"releasedLabels": false
|
|
56
|
+
}]'
|
|
47
57
|
else
|
|
48
58
|
# no gitlabUrl: the plugin derives it from the CI-provided variables
|
|
49
59
|
# of the running instance. It used to be hardcoded to panter's gitlab,
|
|
@@ -52,6 +52,11 @@ workflows the same way (`▶️ catladder deploy`, `⏹️ catladder stop`,
|
|
|
52
52
|
|
|
53
53
|
## `method` — how the version is decided
|
|
54
54
|
|
|
55
|
+
Whichever method runs, the release ends the same way: a `vX.Y.Z` tag, a
|
|
56
|
+
`CHANGELOG.md` entry, a `chore(release): <version>` commit, and an
|
|
57
|
+
entry on the releases page of the git host (gitlab `/-/releases`,
|
|
58
|
+
github `/releases`) carrying the release notes.
|
|
59
|
+
|
|
55
60
|
### `semantic-release` (default)
|
|
56
61
|
The version is derived automatically from **conventional commit
|
|
57
62
|
messages** since the last release (`fix:` → patch, `feat:` → minor,
|
|
@@ -63,8 +68,10 @@ Developers declare changes intentionally as **`.changeset/*.md` files**
|
|
|
63
68
|
(the official changesets format: a bump type + a human-written summary).
|
|
64
69
|
The release job consumes all pending changesets, takes the highest bump,
|
|
65
70
|
computes the next version from the last `v*` git tag, writes the
|
|
66
|
-
changelog, commits `chore(release): <version>`,
|
|
67
|
-
|
|
71
|
+
changelog, commits `chore(release): <version>`, pushes the tag and
|
|
72
|
+
creates the release entry on the git host (gitlab `/-/releases`,
|
|
73
|
+
github `/releases`) with the changelog as its description. An empty
|
|
74
|
+
`.changeset/` folder means there is nothing to release.
|
|
68
75
|
|
|
69
76
|
Add a changeset by creating `.changeset/<name>.md`:
|
|
70
77
|
|
|
@@ -121,6 +128,13 @@ the `security` commands in the `catladder-cli` reference.
|
|
|
121
128
|
MR adding a changeset describing the accumulated work.
|
|
122
129
|
- Wrong version bump → check commit types (semantic-release) or the bump
|
|
123
130
|
levels in the changeset files (changesets).
|
|
131
|
+
- Tag pushed but nothing on the releases page → with `changesets` the
|
|
132
|
+
entry is created via the host api after the push and never fails the
|
|
133
|
+
job (the release itself is done); look for the `could not create the
|
|
134
|
+
release entry` warning at the end of the release job log. On gitlab
|
|
135
|
+
it needs `GL_TOKEN` (`catladder project renew-token`). Releases
|
|
136
|
+
tagged before catladder created entries have none — that is not fixed
|
|
137
|
+
retroactively, create them by hand from the tag.
|
|
124
138
|
- Inspect the job with `yarn catladder project ci job-log` (see the
|
|
125
139
|
`catladder-cli` skill).
|
|
126
140
|
|