Compare commits
5 Commits
fix/gitea-
...
chore/bump
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2357602f50 | ||
| 1230f6b984 | |||
| 14b775f1b9 | |||
|
|
c7691d9807 | ||
| 9a53d55678 |
@@ -35,13 +35,42 @@ steps:
|
|||||||
- |
|
- |
|
||||||
echo "//git.mosaicstack.dev/api/packages/mosaicstack/npm/:_authToken=$NPM_TOKEN" > ~/.npmrc
|
echo "//git.mosaicstack.dev/api/packages/mosaicstack/npm/:_authToken=$NPM_TOKEN" > ~/.npmrc
|
||||||
echo "@mosaicstack:registry=https://git.mosaicstack.dev/api/packages/mosaicstack/npm/" >> ~/.npmrc
|
echo "@mosaicstack:registry=https://git.mosaicstack.dev/api/packages/mosaicstack/npm/" >> ~/.npmrc
|
||||||
# Publish non-private packages to Gitea (--no-git-checks skips dirty/branch checks in CI)
|
# Publish non-private packages to Gitea.
|
||||||
# --filter excludes web (private)
|
#
|
||||||
- >
|
# The only publish failure we tolerate is "version already exists" —
|
||||||
pnpm --filter "@mosaicstack/*"
|
# that legitimately happens when only some packages were bumped in
|
||||||
--filter "!@mosaicstack/web"
|
# the merge. Any other failure (registry 404, auth error, network
|
||||||
publish --no-git-checks --access public
|
# error) MUST fail the pipeline loudly: the previous
|
||||||
|| echo "[publish] Some packages may already exist at this version — continuing"
|
# `|| echo "... continuing"` fallback silently hid a 404 from the
|
||||||
|
# Gitea org rename and caused every @mosaicstack/* publish to fall
|
||||||
|
# on the floor while CI still reported green.
|
||||||
|
- |
|
||||||
|
# Portable sh (Alpine ash) — avoid bashisms like PIPESTATUS.
|
||||||
|
set +e
|
||||||
|
pnpm --filter "@mosaicstack/*" --filter "!@mosaicstack/web" publish --no-git-checks --access public >/tmp/publish.log 2>&1
|
||||||
|
EXIT=$?
|
||||||
|
set -e
|
||||||
|
cat /tmp/publish.log
|
||||||
|
if [ "$EXIT" -eq 0 ]; then
|
||||||
|
echo "[publish] all packages published successfully"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
# Hard registry / auth / network errors → fatal. Match npm's own
|
||||||
|
# error lines specifically to avoid false positives on arbitrary
|
||||||
|
# log text that happens to contain "E404" etc.
|
||||||
|
if grep -qE "npm (error|ERR!) code (E404|E401|ENEEDAUTH|ECONNREFUSED|ETIMEDOUT|ENOTFOUND)" /tmp/publish.log; then
|
||||||
|
echo "[publish] FATAL: registry/auth/network error detected — failing pipeline" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Only tolerate the explicit "version already published" case.
|
||||||
|
# npm returns this as E403 with body "You cannot publish over..."
|
||||||
|
# or EPUBLISHCONFLICT depending on version.
|
||||||
|
if grep -qE "EPUBLISHCONFLICT|You cannot publish over|previously published" /tmp/publish.log; then
|
||||||
|
echo "[publish] some packages already at this version — continuing (non-fatal)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "[publish] FATAL: publish failed with unrecognized error — failing pipeline" >&2
|
||||||
|
exit 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mosaicstack/mosaic",
|
"name": "@mosaicstack/mosaic",
|
||||||
"version": "0.0.20",
|
"version": "0.0.21",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.mosaicstack.dev/mosaicstack/mosaic-stack.git",
|
"url": "https://git.mosaicstack.dev/mosaicstack/mosaic-stack.git",
|
||||||
|
|||||||
@@ -127,10 +127,28 @@ export function semverLt(a: string, b: string): boolean {
|
|||||||
// ─── Known packages for checkForAllUpdates() ──────────────────────────────
|
// ─── Known packages for checkForAllUpdates() ──────────────────────────────
|
||||||
|
|
||||||
const KNOWN_PACKAGES = [
|
const KNOWN_PACKAGES = [
|
||||||
'@mosaicstack/mosaic',
|
'@mosaicstack/agent',
|
||||||
'@mosaicstack/cli',
|
'@mosaicstack/auth',
|
||||||
|
'@mosaicstack/brain',
|
||||||
|
'@mosaicstack/config',
|
||||||
|
'@mosaicstack/coord',
|
||||||
|
'@mosaicstack/db',
|
||||||
|
'@mosaicstack/design-tokens',
|
||||||
|
'@mosaicstack/discord-plugin',
|
||||||
|
'@mosaicstack/forge',
|
||||||
'@mosaicstack/gateway',
|
'@mosaicstack/gateway',
|
||||||
|
'@mosaicstack/log',
|
||||||
|
'@mosaicstack/macp',
|
||||||
|
'@mosaicstack/memory',
|
||||||
|
'@mosaicstack/mosaic',
|
||||||
|
'@mosaicstack/oc-framework-plugin',
|
||||||
|
'@mosaicstack/oc-macp-plugin',
|
||||||
|
'@mosaicstack/prdy',
|
||||||
'@mosaicstack/quality-rails',
|
'@mosaicstack/quality-rails',
|
||||||
|
'@mosaicstack/queue',
|
||||||
|
'@mosaicstack/storage',
|
||||||
|
'@mosaicstack/telegram-plugin',
|
||||||
|
'@mosaicstack/types',
|
||||||
];
|
];
|
||||||
|
|
||||||
// ─── Multi-package types ──────────────────────────────────────────────────
|
// ─── Multi-package types ──────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user