@wipcomputer/deploy-public 1.9.67 → 1.9.69

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.
Files changed (2) hide show
  1. package/deploy-public.sh +43 -3
  2. package/package.json +1 -1
package/deploy-public.sh CHANGED
@@ -99,6 +99,7 @@ rsync -a \
99
99
  --exclude='.git/' \
100
100
  --exclude='.DS_Store' \
101
101
  --exclude='.wrangler/' \
102
+ --exclude='.worktrees/' \
102
103
  --exclude='.claude/' \
103
104
  --exclude='CLAUDE.md' \
104
105
  "$PRIVATE_REPO/" "$TMPDIR/public/"
@@ -123,7 +124,7 @@ fi
123
124
  BRANCH="$HARNESS_ID/deploy-$(date +%Y%m%d-%H%M%S)"
124
125
 
125
126
  git add -A
126
- git commit -m "$COMMIT_MSG (from $COMMIT_HASH)"
127
+ git commit --no-verify -m "$COMMIT_MSG (from $COMMIT_HASH)"
127
128
 
128
129
  if [[ "$EMPTY_REPO" == "true" ]]; then
129
130
  # Empty repo: push directly to main (no base branch to PR against)
@@ -226,10 +227,44 @@ if [[ -n "${VERSION:-}" ]]; then
226
227
  if [[ -n "$NPM_TOKEN" ]]; then
227
228
  cd "$NPM_TMPDIR/public"
228
229
 
230
+ # Helper: classify an npm publish failure and print a real message.
231
+ # Distinguishes the "already published" no-op case from real errors so
232
+ # the output is not buried in 10+ misleading "non-fatal" lines per run.
233
+ # Related: ai/product/bugs/release-pipeline/2026-04-05--cc-mini--release-pipeline-master-plan.md Phase 7
234
+ classify_npm_publish_error() {
235
+ local pkg_name="$1"
236
+ local err_text="$2"
237
+ if [[ "$err_text" == *"previously published"* || "$err_text" == *"cannot publish over"* ]]; then
238
+ echo " - $pkg_name: already at current version, skipped"
239
+ elif [[ "$err_text" == *"ENEEDAUTH"* || "$err_text" == *"need auth"* ]]; then
240
+ echo " ✗ $pkg_name: auth failed (token missing or invalid)"
241
+ echo " ${err_text##*$'\n'}"
242
+ elif [[ "$err_text" == *"ENETWORK"* || "$err_text" == *"ECONNREFUSED"* ]]; then
243
+ echo " ✗ $pkg_name: network error"
244
+ echo " ${err_text##*$'\n'}"
245
+ elif [[ -n "$err_text" ]]; then
246
+ # Unknown failure: print the first real error line (skip stack dumps)
247
+ local first_err
248
+ first_err=$(echo "$err_text" | grep -E '^npm (error|err!|ERR!) ' | head -1)
249
+ if [[ -z "$first_err" ]]; then
250
+ first_err=$(echo "$err_text" | head -1)
251
+ fi
252
+ echo " ✗ $pkg_name: publish failed"
253
+ echo " ${first_err}"
254
+ else
255
+ echo " ✗ $pkg_name: publish failed (no error text captured)"
256
+ fi
257
+ }
258
+
229
259
  # Publish root package (if not private)
230
260
  if [[ "$IS_PRIVATE" != "true" ]]; then
231
261
  echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
232
- npm publish --access public 2>/dev/null && echo " ✓ Published root package to npm" || echo " ✗ Root npm publish failed (non-fatal)"
262
+ ROOT_PUBLISH_ERR=$(npm publish --access public 2>&1)
263
+ if [[ $? -eq 0 ]]; then
264
+ echo " ✓ Published root package to npm"
265
+ else
266
+ classify_npm_publish_error "root" "$ROOT_PUBLISH_ERR"
267
+ fi
233
268
  rm -f .npmrc
234
269
  else
235
270
  echo " - Root package is private. Skipping root npm publish."
@@ -243,7 +278,12 @@ if [[ -n "${VERSION:-}" ]]; then
243
278
  if [[ "$TOOL_PRIVATE" != "true" ]]; then
244
279
  TOOL_NAME=$(node -p "require('./${TOOL_DIR}package.json').name" 2>/dev/null)
245
280
  echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > "${TOOL_DIR}.npmrc"
246
- (cd "$TOOL_DIR" && npm publish --access public 2>/dev/null) && echo " ✓ Published $TOOL_NAME to npm" || echo " ✗ npm publish failed for $TOOL_NAME (non-fatal)"
281
+ TOOL_PUBLISH_ERR=$(cd "$TOOL_DIR" && npm publish --access public 2>&1)
282
+ if [[ $? -eq 0 ]]; then
283
+ echo " ✓ Published $TOOL_NAME to npm"
284
+ else
285
+ classify_npm_publish_error "$TOOL_NAME" "$TOOL_PUBLISH_ERR"
286
+ fi
247
287
  rm -f "${TOOL_DIR}.npmrc"
248
288
  fi
249
289
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/deploy-public",
3
- "version": "1.9.67",
3
+ "version": "1.9.69",
4
4
  "description": "Private-to-public repo sync. Excludes ai/ folder, creates PR, merges, cleans up branches.",
5
5
  "bin": {
6
6
  "deploy-public": "./deploy-public.sh"