refactor(scripts): move 5 Gitea scripts into scripts/gitea/ subdirectory

Moved:
  publish-local-gitea-packages.sh  → gitea/publish-local-packages.sh
  publish-outdated-gitea-packages.sh → gitea/publish-outdated-packages.sh
  release-gitea-packages.sh        → gitea/release-packages.sh
  run-registry-tests.sh            → gitea/run-registry-tests.sh
  harden-publish-config.sh         → gitea/harden-publish-config.sh

Dropped -gitea- infix (redundant with folder name).

Fixed in every moved script:
- REPO_ROOT: ../ → ../../ (one level deeper)
- Internal cross-reference comments

Updated all 10 referencing files:
- package.json (release script path)
- .gitea/workflows/ci.yml (publish step)
- 3 workflow .md files (publish-outdated usage)
- 3 devops docs (publish-local + registry-tests refs)
- 2 internal comment cross-references
This commit is contained in:
saravanakumardb1 2026-04-13 00:02:55 -07:00
parent 97c0ad9554
commit 54a06e227a
13 changed files with 65 additions and 65 deletions

View File

@ -72,4 +72,4 @@ jobs:
run: pnpm -r --filter './packages/**' build run: pnpm -r --filter './packages/**' build
- name: Publish to local Gitea registry - name: Publish to local Gitea registry
run: bash ./scripts/publish-local-gitea-packages.sh run: bash ./scripts/gitea/publish-local-packages.sh

View File

@ -47,7 +47,7 @@ Run the script in `--dry-run` mode first to see which packages need publishing w
// turbo // turbo
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --dry-run cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --dry-run
``` ```
Review the output: Review the output:
@ -62,7 +62,7 @@ Review the output:
If the dry-run shows outdated packages, run the script without `--dry-run` to publish them. If the dry-run shows outdated packages, run the script without `--dry-run` to publish them.
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh
``` ```
The script will: The script will:
@ -84,7 +84,7 @@ cd /Users/sd9235/code/mygh/learning_ai_common_plat && git add packages/*/package
### 5. (Optional) Publish a single package ### 5. (Optional) Publish a single package
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --filter @bytelyst/errors cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --filter @bytelyst/errors
``` ```
### 6. (Optional) Skip the build step ### 6. (Optional) Skip the build step
@ -92,7 +92,7 @@ cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outda
If you already ran `pnpm build`: If you already ran `pnpm build`:
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --skip-build cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --skip-build
``` ```
--- ---
@ -134,6 +134,6 @@ On both networks, the script:
## Script location ## Script location
`scripts/publish-outdated-gitea-packages.sh` in `learning_ai_common_plat` `scripts/gitea/publish-outdated-packages.sh` in `learning_ai_common_plat`
Run `bash scripts/publish-outdated-gitea-packages.sh --help` for usage. Run `bash scripts/gitea/publish-outdated-packages.sh --help` for usage.

View File

@ -47,7 +47,7 @@ Run the script in `--dry-run` mode first to see which packages need publishing w
// turbo // turbo
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --dry-run cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --dry-run
``` ```
Review the output: Review the output:
@ -62,7 +62,7 @@ Review the output:
If the dry-run shows outdated packages, run the script without `--dry-run` to publish them. If the dry-run shows outdated packages, run the script without `--dry-run` to publish them.
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh
``` ```
The script will: The script will:
@ -84,7 +84,7 @@ cd /Users/sd9235/code/mygh/learning_ai_common_plat && git add packages/*/package
### 5. (Optional) Publish a single package ### 5. (Optional) Publish a single package
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --filter @bytelyst/errors cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --filter @bytelyst/errors
``` ```
### 6. (Optional) Skip the build step ### 6. (Optional) Skip the build step
@ -92,7 +92,7 @@ cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outda
If you already ran `pnpm build`: If you already ran `pnpm build`:
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --skip-build cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --skip-build
``` ```
--- ---
@ -134,6 +134,6 @@ On both networks, the script:
## Script location ## Script location
`scripts/publish-outdated-gitea-packages.sh` in `learning_ai_common_plat` `scripts/gitea/publish-outdated-packages.sh` in `learning_ai_common_plat`
Run `bash scripts/publish-outdated-gitea-packages.sh --help` for usage. Run `bash scripts/gitea/publish-outdated-packages.sh --help` for usage.

View File

@ -47,7 +47,7 @@ Run the script in `--dry-run` mode first to see which packages need publishing w
// turbo // turbo
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --dry-run cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --dry-run
``` ```
Review the output: Review the output:
@ -62,7 +62,7 @@ Review the output:
If the dry-run shows outdated packages, run the script without `--dry-run` to publish them. If the dry-run shows outdated packages, run the script without `--dry-run` to publish them.
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh
``` ```
The script will: The script will:
@ -84,7 +84,7 @@ cd /Users/sd9235/code/mygh/learning_ai_common_plat && git add packages/*/package
### 5. (Optional) Publish a single package ### 5. (Optional) Publish a single package
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --filter @bytelyst/errors cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --filter @bytelyst/errors
``` ```
### 6. (Optional) Skip the build step ### 6. (Optional) Skip the build step
@ -92,7 +92,7 @@ cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outda
If you already ran `pnpm build`: If you already ran `pnpm build`:
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/publish-outdated-gitea-packages.sh --skip-build cd /Users/sd9235/code/mygh/learning_ai_common_plat && bash scripts/gitea/publish-outdated-packages.sh --skip-build
``` ```
--- ---
@ -134,6 +134,6 @@ On both networks, the script:
## Script location ## Script location
`scripts/publish-outdated-gitea-packages.sh` in `learning_ai_common_plat` `scripts/gitea/publish-outdated-packages.sh` in `learning_ai_common_plat`
Run `bash scripts/publish-outdated-gitea-packages.sh --help` for usage. Run `bash scripts/gitea/publish-outdated-packages.sh --help` for usage.

View File

@ -158,7 +158,7 @@ What worked:
This is now codified in the local-only helper script: This is now codified in the local-only helper script:
`scripts/publish-local-gitea-packages.sh` `scripts/gitea/publish-local-packages.sh`
That script is currently the authoritative local rehearsal path for publishing `@bytelyst/*` packages to local Gitea. That script is currently the authoritative local rehearsal path for publishing `@bytelyst/*` packages to local Gitea.
@ -335,14 +335,14 @@ Use the local-only helper script for this rehearsal:
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat cd /Users/sd9235/code/mygh/learning_ai_common_plat
GITEA_NPM_TOKEN='<local-token>' bash ./scripts/publish-local-gitea-packages.sh GITEA_NPM_TOKEN='<local-token>' bash ./scripts/gitea/publish-local-packages.sh
``` ```
For a single package: For a single package:
```bash ```bash
cd /Users/sd9235/code/mygh/learning_ai_common_plat cd /Users/sd9235/code/mygh/learning_ai_common_plat
GITEA_NPM_TOKEN='<local-token>' bash ./scripts/publish-local-gitea-packages.sh '@bytelyst/errors' GITEA_NPM_TOKEN='<local-token>' bash ./scripts/gitea/publish-local-packages.sh '@bytelyst/errors'
``` ```
### 7.4 Start with a minimal package pilot set ### 7.4 Start with a minimal package pilot set
@ -526,7 +526,7 @@ No registry-side action is needed. The Gitea packages remain published and don't
### When rollback is NOT needed ### When rollback is NOT needed
- If a package is missing from the registry → publish it with `scripts/publish-local-gitea-packages.sh` - If a package is missing from the registry → publish it with `scripts/gitea/publish-local-packages.sh`
- If a transitive dep is missing → add it explicitly to `package.json` (this surfaced for `@expo/vector-icons` in NomGap) - If a transitive dep is missing → add it explicitly to `package.json` (this surfaced for `@expo/vector-icons` in NomGap)
--- ---

View File

@ -869,7 +869,7 @@ kubectl get pods -A
## 10. Dockerization Status ## 10. Dockerization Status
| Repo | Backend Dockerfile | Web Dockerfile | `output:'standalone'` | Build Context | Status | | Repo | Backend Dockerfile | Web Dockerfile | `output:'standalone'` | Build Context | Status |
| ------------------ | ------------------ | ------------------- | --------------------- | -------------- | --------- | | ------------------ | ------------------ | ------------------- | --------------------- | -------------- | -------- |
| **LysnrAI** | ✅ | ✅ user-dashboard | ✅ (conditional) | repo root | ✅ Ready | | **LysnrAI** | ✅ | ✅ user-dashboard | ✅ (conditional) | repo root | ✅ Ready |
| **MindLyst** | ✅ | ✅ | ✅ (conditional) | repo root | ✅ Ready | | **MindLyst** | ✅ | ✅ | ✅ (conditional) | repo root | ✅ Ready |
| **ChronoMind** | ✅ | ✅ | ✅ (conditional) | backend/ | ✅ Ready | | **ChronoMind** | ✅ | ✅ | ✅ (conditional) | backend/ | ✅ Ready |
@ -998,7 +998,7 @@ Gitea is a lightweight, self-hosted Git forge (~150 MB RAM) that provides three
# Build and publish all @bytelyst/* packages to Gitea # Build and publish all @bytelyst/* packages to Gitea
cd learning_ai_common_plat cd learning_ai_common_plat
pnpm -r --filter './packages/**' build pnpm -r --filter './packages/**' build
GITEA_NPM_TOKEN='<token>' bash ./scripts/publish-local-gitea-packages.sh GITEA_NPM_TOKEN='<token>' bash ./scripts/gitea/publish-local-packages.sh
``` ```
The publish helper uses `pnpm pack` first so `workspace:*` references are normalized before publishing to Gitea. The publish helper uses `pnpm pack` first so `workspace:*` references are normalized before publishing to Gitea.
@ -1128,7 +1128,7 @@ LocalMemGPT uses `OLLAMA_URL: 'http://host.docker.internal:11434'` — this work
All audit findings have been resolved: All audit findings have been resolved:
| Priority | Item | Status | | Priority | Item | Status |
| -------- | ---------------------------------------------- | -------- | | -------- | --------------------------------------------- | ------- |
| **P0** | All backend + web Dockerfiles created | ✅ Done | | **P0** | All backend + web Dockerfiles created | ✅ Done |
| **P0** | `output: 'standalone'` in all web configs | ✅ Done | | **P0** | `output: 'standalone'` in all web configs | ✅ Done |
| **P0** | Gitea npm registry for `@bytelyst/*` packages | ✅ Done | | **P0** | Gitea npm registry for `@bytelyst/*` packages | ✅ Done |

View File

@ -331,7 +331,7 @@ All optional — defaults work for most setups:
- Keep backend ports closed publicly once DNS and NSG rules are aligned. Docker-internal service discovery remains unchanged. - Keep backend ports closed publicly once DNS and NSG rules are aligned. Docker-internal service discovery remains unchanged.
- `ollama.bytelyst.com` reverse proxies to the host Ollama listener on `172.17.0.1:11434`; keep it restricted to trusted cross-VM or internal clients. - `ollama.bytelyst.com` reverse proxies to the host Ollama listener on `172.17.0.1:11434`; keep it restricted to trusted cross-VM or internal clients.
- **Network guard:** run `source scripts/switch-network.sh` and honor `NETWORK=corp|home` before running pnpm/npm or hitting gitea/api endpoints so proxy settings flip to the correct environment. - **Network guard:** run `source scripts/switch-network.sh` and honor `NETWORK=corp|home` before running pnpm/npm or hitting gitea/api endpoints so proxy settings flip to the correct environment.
- **Quick check:** use `scripts/run-registry-tests.sh` to install, test, and verify `https://api.bytelyst.com`, `https://gitea.bytelyst.com`, and `https://ollama.bytelyst.com`. - **Quick check:** use `scripts/gitea/run-registry-tests.sh` to install, test, and verify `https://api.bytelyst.com`, `https://gitea.bytelyst.com`, and `https://ollama.bytelyst.com`.
## Known Limitations ## Known Limitations

View File

@ -20,7 +20,7 @@
"clean": "pnpm -r exec rm -rf dist", "clean": "pnpm -r exec rm -rf dist",
"dns:godaddy:bytelyst": "./scripts/godaddy-sync-bytelyst-dns.sh", "dns:godaddy:bytelyst": "./scripts/godaddy-sync-bytelyst-dns.sh",
"prototype:self-test": "./scripts/prototype-self-test.sh", "prototype:self-test": "./scripts/prototype-self-test.sh",
"release": "./scripts/release-gitea-packages.sh", "release": "./scripts/gitea/release-packages.sh",
"prepare": "husky" "prepare": "husky"
}, },
"devDependencies": { "devDependencies": {

View File

@ -7,7 +7,7 @@ set -euo pipefail
# ───────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────
REGISTRY="https://gitea.bytelyst.com/api/packages/ByteLyst/npm/" REGISTRY="https://gitea.bytelyst.com/api/packages/ByteLyst/npm/"
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
PACKAGES_DIR="$REPO_ROOT/packages" PACKAGES_DIR="$REPO_ROOT/packages"
# Skip native SDKs (not published to npm) # Skip native SDKs (not published to npm)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
PACKAGES_DIR="$REPO_ROOT/packages" PACKAGES_DIR="$REPO_ROOT/packages"
TMP_DIR="${TMPDIR:-/tmp}/bytelyst-gitea-publish" TMP_DIR="${TMPDIR:-/tmp}/bytelyst-gitea-publish"
REGISTRY_URL="${GITEA_NPM_REGISTRY_URL:-https://gitea.bytelyst.com/api/packages/ByteLyst/npm/}" REGISTRY_URL="${GITEA_NPM_REGISTRY_URL:-https://gitea.bytelyst.com/api/packages/ByteLyst/npm/}"

View File

@ -8,14 +8,14 @@ set -euo pipefail
# Only publishes packages where the content has actually changed. # Only publishes packages where the content has actually changed.
# #
# Usage: # Usage:
# ./scripts/publish-outdated-gitea-packages.sh # detect + publish # ./scripts/gitea/publish-outdated-packages.sh # detect + publish
# ./scripts/publish-outdated-gitea-packages.sh --dry-run # detect only # ./scripts/gitea/publish-outdated-packages.sh --dry-run # detect only
# ./scripts/publish-outdated-gitea-packages.sh --filter @bytelyst/errors # ./scripts/gitea/publish-outdated-packages.sh --filter @bytelyst/errors
# #
# Requires: GITEA_NPM_TOKEN env var (or ~/.gitea_npm_token) # Requires: GITEA_NPM_TOKEN env var (or ~/.gitea_npm_token)
# ───────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
PACKAGES_DIR="$REPO_ROOT/packages" PACKAGES_DIR="$REPO_ROOT/packages"
# ── Network-aware Gitea resolution ───────────────────────── # ── Network-aware Gitea resolution ─────────────────────────
@ -186,7 +186,7 @@ bump_patch_version() {
" "$pkg_json" "$published_versions" " "$pkg_json" "$published_versions"
} }
# Publish a package using the same double-pack pattern as publish-local-gitea-packages.sh. # Publish a package using the same double-pack pattern as publish-local-packages.sh.
publish_package() { publish_package() {
local pkg_dir="$1" local pkg_dir="$1"
local pkg_name pkg_version safe_name local pkg_name pkg_version safe_name

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# release-gitea-packages.sh — Version-bump + publish @bytelyst/* packages to Gitea npm registry # release-packages.sh — Version-bump + publish @bytelyst/* packages to Gitea npm registry
# #
# Usage: # Usage:
# ./scripts/release-gitea-packages.sh # apply pending changesets + publish missing/outdated packages # ./scripts/gitea/release-packages.sh # apply pending changesets + publish missing/outdated packages
# ./scripts/release-gitea-packages.sh --patch # auto-bump all packages (patch) + publish # ./scripts/gitea/release-packages.sh --patch # auto-bump all packages (patch) + publish
# ./scripts/release-gitea-packages.sh --minor # auto-bump all packages (minor) + publish # ./scripts/gitea/release-packages.sh --minor # auto-bump all packages (minor) + publish
# ./scripts/release-gitea-packages.sh --major # auto-bump all packages (major) + publish # ./scripts/gitea/release-packages.sh --major # auto-bump all packages (major) + publish
# ./scripts/release-gitea-packages.sh --dry-run # show what would be published, no side effects # ./scripts/gitea/release-packages.sh --dry-run # show what would be published, no side effects
# #
# Required env: # Required env:
# GITEA_NPM_TOKEN — auth token for the Gitea npm registry (or ~/.gitea_npm_token file) # GITEA_NPM_TOKEN — auth token for the Gitea npm registry (or ~/.gitea_npm_token file)
@ -22,10 +22,10 @@ set -euo pipefail
# ── Config ───────────────────────────────────────────────────────────────────── # ── Config ─────────────────────────────────────────────────────────────────────
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
# ── Network-aware Gitea resolution ───────────────────────────────────────────── # ── Network-aware Gitea resolution ─────────────────────────────────────────────
# Matches the pattern in publish-outdated-gitea-packages.sh # Matches the pattern in publish-outdated-packages.sh
NETWORK_MODE="${NETWORK:-home}" NETWORK_MODE="${NETWORK:-home}"
if [ "$NETWORK_MODE" = "corp" ]; then if [ "$NETWORK_MODE" = "corp" ]; then