@columenlabs/lumen-ship 0.1.29 → 0.1.31
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/README.md +3 -1
- package/package.json +1 -1
- package/scripts/release.sh +7 -4
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Pin it to the same exact version as the other Lumen packages. The command needs
|
|
|
20
20
|
|
|
21
21
|
| Command | What it does |
|
|
22
22
|
|---|---|
|
|
23
|
-
| `lumen-ship release` | One patch release at `main` once `cadence.every` merges landed since the newest
|
|
23
|
+
| `lumen-ship release` | One patch release at `main` once `cadence.every` merges landed since the newest release tag, or on the first merge `cadence.days` days after it. `FORCE=1` cuts it now |
|
|
24
24
|
| `lumen-ship release minor` | Tags `main` as the next minor. Its notes are the hand-written `docs/releases/v<major>.<minor>.0.md`, which must be on `main` |
|
|
25
25
|
| `lumen-ship release notes` | Sets the newest minor's notes from its file again |
|
|
26
26
|
| `lumen-ship release tag v1.2.3` | Makes the release of a tag that already exists (for a publish job that tags first). `REDO=1` writes its notes again |
|
|
@@ -76,6 +76,7 @@ At the repo root (or the path in `LUMEN_SHIP_CONFIG`):
|
|
|
76
76
|
"repo": "owner/name",
|
|
77
77
|
"notes": { "prompt": ".github/release-prompt.md", "model": "claude-sonnet-5-5", "maxTokens": 16000 },
|
|
78
78
|
"changelog": { "path": "src/changelog.json", "apps": { "console": "console", "api": "api" } },
|
|
79
|
+
"tags": "v0.*",
|
|
79
80
|
"promote": "release",
|
|
80
81
|
"cadence": { "every": 10, "days": 7 }
|
|
81
82
|
}
|
|
@@ -88,6 +89,7 @@ At the repo root (or the path in `LUMEN_SHIP_CONFIG`):
|
|
|
88
89
|
| `notes.model`, `notes.maxTokens` | The model and its output limit (the model thinks first, so keep it large) |
|
|
89
90
|
| `changelog.path` | Where the What's new JSON lives on `main`; left out, no changelog |
|
|
90
91
|
| `changelog.apps` | Tag (lower case) → app id, for takeaways about one app |
|
|
92
|
+
| `tags` | The release tags as a git glob, `v[0-9]*` by default; narrow it when older tags of another scheme sort higher |
|
|
91
93
|
| `promote` | A branch fast-forwarded to each new release (a production deploy branch, say) |
|
|
92
94
|
| `cadence.every`, `cadence.days` | When a patch is due. `RELEASE_EVERY` overrides `every` |
|
|
93
95
|
|
package/package.json
CHANGED
package/scripts/release.sh
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
# Cut a repo's GitHub releases with notes Claude writes from the merged pull requests, through the
|
|
3
3
|
# GitHub REST API. Run from the repo's root, which holds lumen-ship.json (see the package README).
|
|
4
4
|
# lumen-ship release one patch release at main once `cadence.every` first-parent merges
|
|
5
|
-
# landed since the latest
|
|
6
|
-
# `cadence.days` days after it; FORCE=1
|
|
5
|
+
# landed since the latest release tag (`tags`, default v[0-9]*),
|
|
6
|
+
# or on the first merge `cadence.days` days after it; FORCE=1
|
|
7
|
+
# cuts it now
|
|
7
8
|
# lumen-ship release minor tag main as the next minor; its notes are the hand-written
|
|
8
9
|
# docs/releases/v<major>.<minor>.0.md (required)
|
|
9
10
|
# lumen-ship release notes set the latest minor release's notes from its file again
|
|
@@ -31,6 +32,8 @@ APPS=$(jq -c '.changelog.apps // {}' "$CONFIG")
|
|
|
31
32
|
PROMOTE=$(cfg .promote)
|
|
32
33
|
EVERY=${RELEASE_EVERY:-$(cfg .cadence.every)}; EVERY=${EVERY:-10}
|
|
33
34
|
DAYS=$(cfg .cadence.days); DAYS=${DAYS:-7}
|
|
35
|
+
# The release tags, as a git glob: narrow it when the repo keeps tags of an older scheme.
|
|
36
|
+
TAGS=$(cfg .tags); TAGS=${TAGS:-v[0-9]*}
|
|
34
37
|
DRY_RUN=${DRY_RUN:-0}
|
|
35
38
|
FORCE=${FORCE:-0}
|
|
36
39
|
REDO=${REDO:-0}
|
|
@@ -164,12 +167,12 @@ release() { # tag sha previous-tag [notes-file]: a new tag and its release
|
|
|
164
167
|
promote "$sha"
|
|
165
168
|
}
|
|
166
169
|
|
|
167
|
-
LATEST=$(git tag --list
|
|
170
|
+
LATEST=$(git tag --list "$TAGS" --sort=-v:refname | head -1)
|
|
168
171
|
case "$MODE" in
|
|
169
172
|
tag)
|
|
170
173
|
TAG=${2:?usage: lumen-ship release tag v<version>}
|
|
171
174
|
git rev-parse -q --verify "refs/tags/$TAG" > /dev/null || { echo "no tag $TAG" >&2; exit 1; }
|
|
172
|
-
PREV=$(git tag --list
|
|
175
|
+
PREV=$(git tag --list "$TAGS" --sort=-v:refname | awk -v t="$TAG" 'found { print; exit } $0 == t { found = 1 }')
|
|
173
176
|
SHA=$(git rev-list -n1 "$TAG")
|
|
174
177
|
# A tag with no release answers 404, whose error body gh still prints: keep only an id.
|
|
175
178
|
ID=$(gh api "repos/$REPO/releases/tags/$TAG" --jq .id 2> /dev/null || true)
|