🌐 AI搜索 & 代理 主页
Skip to content

Commit e29fbed

Browse files
Nik SamokhvalovNik Samokhvalov
authored andcommitted
chore(cli): bump version to 0.14.0-dev.1
- Switch npm prerelease channel to dev - Update CI publish job to publish dev/beta based on tag
1 parent d60841b commit e29fbed

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ cli:npm:publish:
143143
set -euo pipefail
144144
: "${NPM_TOKEN:?NPM_TOKEN is required to publish}"
145145
146-
# Tags should look like: cli-v0.14.0-beta.1
146+
# Tags should look like: cli-v0.14.0-dev.1 (or cli-v0.14.0-beta.1)
147147
case "${CI_COMMIT_TAG:-}" in
148148
cli-v*) ;;
149149
*) echo "Not a CLI publish tag, skipping"; exit 1 ;;
@@ -153,6 +153,12 @@ cli:npm:publish:
153153
154154
PKG_VERSION="$(node -p "require('./package.json').version")"
155155
TAG_VERSION="${CI_COMMIT_TAG#cli-v}"
156+
DIST_TAG="$(printf '%s' "$TAG_VERSION" | sed -E 's/^.*-(dev|beta)\\.[0-9]+$/\\1/')"
157+
158+
if [ "$DIST_TAG" != "dev" ] && [ "$DIST_TAG" != "beta" ]; then
159+
echo "Unsupported prerelease channel in tag/version: $TAG_VERSION (expected -dev.N or -beta.N)"
160+
exit 1
161+
fi
156162
157163
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
158164
echo "Version mismatch: cli/package.json=$PKG_VERSION but tag=$TAG_VERSION"
@@ -164,11 +170,11 @@ cli:npm:publish:
164170
165171
npm ci --no-audit --no-fund
166172
npm run build
167-
npm publish --tag beta --access public
173+
npm publish --tag "$DIST_TAG" --access public
168174
after_script:
169175
- rm -f ~/.npmrc
170176
rules:
171-
- if: '$CI_COMMIT_TAG =~ /^cli-v\\d+\\.\\d+\\.\\d+-beta\\.\\d+$/'
177+
- if: '$CI_COMMIT_TAG =~ /^cli-v\\d+\\.\\d+\\.\\d+-(dev|beta)\\.\\d+$/'
172178

173179
cli:node:e2e:dind:
174180
stage: test

cli/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postgresai",
3-
"version": "0.14.0-beta.1",
3+
"version": "0.14.0-dev.1",
44
"description": "postgres_ai CLI (Node.js)",
55
"license": "Apache-2.0",
66
"private": false,

0 commit comments

Comments
 (0)