From d693837150fa0e8df8d8af32d57a3072c67bec89 Mon Sep 17 00:00:00 2001 From: saltbo Date: Fri, 12 Jun 2026 12:45:39 -0400 Subject: [PATCH] chore: update default branch references from master to main --- .github/workflows/ci.yml | 4 ++-- .github/workflows/deploy.yml | 4 ++-- CLAUDE.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 6 +++--- docs/architecture.md | 2 +- docs/deploy/aws-lambda.md | 2 +- docs/deploy/azure-functions.md | 2 +- docs/deploy/cloud-run.md | 2 +- docs/deploy/netlify.md | 2 +- docs/deploy/vercel.md | 2 +- docs/i18n/README.es.md | 6 +++--- docs/i18n/README.ja.md | 6 +++--- docs/i18n/README.ko.md | 6 +++--- docs/i18n/README.pt-BR.md | 6 +++--- docs/i18n/README.ru.md | 6 +++--- docs/i18n/README.zh-CN.md | 6 +++--- docs/roadmap/v2.5.md | 6 +++--- package.json | 2 +- scripts/check-release-version.mjs | 4 ++-- scripts/release.mjs | 2 +- shared/constants.ts | 2 +- 22 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e8eca75..8b198ad3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] env: E2E_CLOUD_PRO_EMAIL: ${{ secrets.E2E_CLOUD_PRO_EMAIL }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ea314754..3a3b44f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Deploy # Fan-out dispatcher for ZPan's 6 deployment targets. # -# On push to master (or manual trigger), a quick `detect` job probes which +# On push to main (or manual trigger), a quick `detect` job probes which # platform secrets are configured and sets one output per platform. Each # platform's reusable child workflow (deploy-.yml) is invoked only # when its flag is `true` — platforms you haven't configured are shown as @@ -14,7 +14,7 @@ name: Deploy on: push: - branches: [master] + branches: [main] workflow_dispatch: concurrency: diff --git a/CLAUDE.md b/CLAUDE.md index 7d5f8bf4..36d758fe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,7 +31,7 @@ This is a full-stack project. When implementing a feature or fixing a bug, think ## Commit Convention -Conventional Commits (`feat:`, `fix:`, `docs:`, etc.). PRs target `master`. +Conventional Commits (`feat:`, `fix:`, `docs:`, etc.). PRs target `main`. ## Pre-commit Hooks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cfa485cf..3a7babad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ pnpm e2e # Playwright E2E tests 3. **Run checks** — `pnpm lint && pnpm typecheck && pnpm test && pnpm test:cf` 4. **Coverage** — new code must maintain 90%+ line coverage on `server/` 5. **Commit** — use [Conventional Commits](https://www.conventionalcommits.org) (`feat:`, `fix:`, `docs:`, etc.) -6. **PR** — target the `master` branch +6. **PR** — target the `main` branch 7. **Preview verification** — every PR must be verified in the preview environment (see below) ## Preview Verification diff --git a/README.md b/README.md index 25776501..ad7e08d0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -134,14 +134,14 @@ See [docs/deploy/aws-lambda.md](docs/deploy/aws-lambda.md) for full setup instru **Quick start** — pull the pre-built image and bring your own S3 storage: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **With RustFS** (self-hosted S3-compatible storage, no external dependencies): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/architecture.md b/docs/architecture.md index 5a2a5c46..e9699154 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -143,7 +143,7 @@ GitHub Actions: - `pnpm test` — Vitest unit + API tests - `pnpm e2e` — Playwright tests -**On merge to master:** +**On merge to main:** - Build + deploy to CF Workers (preview / production) - Build Docker image + push to Docker Hub (planned) diff --git a/docs/deploy/aws-lambda.md b/docs/deploy/aws-lambda.md index daaef9ff..279f1ddf 100644 --- a/docs/deploy/aws-lambda.md +++ b/docs/deploy/aws-lambda.md @@ -58,7 +58,7 @@ For production, scope the `Resource` fields to specific ARNs. The workflow creat 2. Add the secrets above 3. Go to the **Actions** tab → **Deploy to AWS Lambda** → **Run workflow** -The workflow runs automatically on every push to `master` after initial setup. Re-running is idempotent — it redeploys without recreating existing resources. +The workflow runs automatically on every push to `main` after initial setup. Re-running is idempotent — it redeploys without recreating existing resources. ## First-boot storage setup diff --git a/docs/deploy/azure-functions.md b/docs/deploy/azure-functions.md index 931498e5..fc5fd874 100644 --- a/docs/deploy/azure-functions.md +++ b/docs/deploy/azure-functions.md @@ -77,7 +77,7 @@ In your fork go to **Settings → Secrets and variables → Actions** and add: ## 4 — Run the workflow -The workflow triggers automatically on every push to `master` **and** can be triggered manually via **Actions → Deploy to Azure Functions → Run workflow**. +The workflow triggers automatically on every push to `main` **and** can be triggered manually via **Actions → Deploy to Azure Functions → Run workflow**. > The workflow includes `if: github.repository != 'saltbo/zpan'` so it is a no-op in the upstream repo. It only runs in your fork. diff --git a/docs/deploy/cloud-run.md b/docs/deploy/cloud-run.md index d459b7c6..f23e5ff2 100644 --- a/docs/deploy/cloud-run.md +++ b/docs/deploy/cloud-run.md @@ -73,7 +73,7 @@ Set these in your fork's GitHub repository under **Settings → Secrets and vari 5. **Add the required secrets** to your fork (see table above). `BETTER_AUTH_URL` and `BETTER_AUTH_SECRET` are both optional — the workflow handles them automatically on first deploy. -6. **Push to `master`** — the `deploy-cloud-run.yml` workflow runs automatically. Cloud Build builds the image, Turso migrations run, `service.yaml` drives the Cloud Run deploy, and `BETTER_AUTH_URL` is auto-wired from the assigned service URL. +6. **Push to `main`** — the `deploy-cloud-run.yml` workflow runs automatically. Cloud Build builds the image, Turso migrations run, `service.yaml` drives the Cloud Run deploy, and `BETTER_AUTH_URL` is auto-wired from the assigned service URL. ## Workflow Steps diff --git a/docs/deploy/netlify.md b/docs/deploy/netlify.md index 17e68202..de35e875 100644 --- a/docs/deploy/netlify.md +++ b/docs/deploy/netlify.md @@ -55,7 +55,7 @@ In your fork, go to **Settings → Secrets and variables → Actions → New rep ## Trigger Deploy -Push to `master` or go to **Actions → Deploy to Netlify → Run workflow**. +Push to `main` or go to **Actions → Deploy to Netlify → Run workflow**. The workflow will: 1. Resolve the latest ZPan release from the upstream repo diff --git a/docs/deploy/vercel.md b/docs/deploy/vercel.md index d2803933..a90f101f 100644 --- a/docs/deploy/vercel.md +++ b/docs/deploy/vercel.md @@ -52,7 +52,7 @@ Set these in your fork's GitHub repository under **Settings → Secrets and vari 4. **Add the required secrets** to your fork (see table above). `BETTER_AUTH_SECRET` is optional — the workflow auto-generates one on first deploy and stores it in your Vercel project env. -5. **Push to `master`** — the `deploy-vercel.yml` workflow runs automatically and deploys to production. +5. **Push to `main`** — the `deploy-vercel.yml` workflow runs automatically and deploys to production. ## Local Development diff --git a/docs/i18n/README.es.md b/docs/i18n/README.es.md index 958bc77f..1f9ab438 100644 --- a/docs/i18n/README.es.md +++ b/docs/i18n/README.es.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -130,14 +130,14 @@ Consulta [docs/deploy/aws-lambda.md](../deploy/aws-lambda.md) para obtener las i **Inicio rápido** — descarga la imagen precompilada y aporta tu propio almacenamiento S3: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **Con RustFS** (almacenamiento compatible con S3 autoalojado, sin dependencias externas): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/i18n/README.ja.md b/docs/i18n/README.ja.md index dbaf8350..05d428e7 100644 --- a/docs/i18n/README.ja.md +++ b/docs/i18n/README.ja.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -130,14 +130,14 @@ SAM を使って GitHub Actions 経由でデプロイ。Lambda Function URL が **クイックスタート** — ビルド済みイメージをプルし、自分の S3 ストレージを用意します: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **RustFS を使う場合**(セルフホスト型の S3 互換ストレージ、外部依存なし): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/i18n/README.ko.md b/docs/i18n/README.ko.md index 5ebefd08..fcf5a1f9 100644 --- a/docs/i18n/README.ko.md +++ b/docs/i18n/README.ko.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -130,14 +130,14 @@ SAM을 사용하여 GitHub Actions를 통해 배포합니다. Lambda Function UR **빠른 시작** — 미리 빌드된 이미지를 가져오고 직접 보유한 S3 스토리지를 사용합니다: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **RustFS 사용** (셀프 호스팅 S3 호환 스토리지, 외부 의존성 없음): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/i18n/README.pt-BR.md b/docs/i18n/README.pt-BR.md index 46c6c0c8..45b9bb2b 100644 --- a/docs/i18n/README.pt-BR.md +++ b/docs/i18n/README.pt-BR.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -130,14 +130,14 @@ Veja [docs/deploy/aws-lambda.md](../deploy/aws-lambda.md) para instruções comp **Início rápido** — baixe a imagem pré-construída e traga seu próprio armazenamento S3: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **Com RustFS** (armazenamento S3-compatible self-hosted, sem dependências externas): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/i18n/README.ru.md b/docs/i18n/README.ru.md index cf374777..37452452 100644 --- a/docs/i18n/README.ru.md +++ b/docs/i18n/README.ru.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -130,14 +130,14 @@ ZPan не стремится быть: **Быстрый старт** — загрузите готовый образ и подключите своё S3-хранилище: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **С RustFS** (самостоятельно размещаемое S3-совместимое хранилище, без внешних зависимостей): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/i18n/README.zh-CN.md b/docs/i18n/README.zh-CN.md index fc642e0f..6a7c61d6 100644 --- a/docs/i18n/README.zh-CN.md +++ b/docs/i18n/README.zh-CN.md @@ -18,7 +18,7 @@ Release GitHub Release Docker Image - License + License

@@ -130,14 +130,14 @@ ZPan 并不打算成为: **快速开始** — 拉取预构建镜像并自带 S3 存储: ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.yml docker compose up -d ``` **搭配 RustFS**(自托管的 S3-compatible 存储,无外部依赖): ```bash -curl -O https://raw.githubusercontent.com/saltbo/zpan/master/deploy/docker-compose.rustfs.yml +curl -O https://raw.githubusercontent.com/saltbo/zpan/main/deploy/docker-compose.rustfs.yml docker compose -f docker-compose.rustfs.yml up -d ``` diff --git a/docs/roadmap/v2.5.md b/docs/roadmap/v2.5.md index 3d1a234b..3c0912d3 100644 --- a/docs/roadmap/v2.5.md +++ b/docs/roadmap/v2.5.md @@ -109,7 +109,7 @@ Every target's docs follow this 3-step flow: > **Note on S3 credentials.** S3 / R2 / OSS / COS bucket configuration is **not** a GitHub Secret. ZPan stores storage credentials in the `storages` database table, configured via the admin UI after the first deploy. This keeps bucket secrets off both GitHub and the workflow logs, and lets a single ZPan instance manage multiple storage backends. -3. **Trigger deploy** — `git push origin master` or Actions tab → Run workflow. +3. **Trigger deploy** — `git push origin main` or Actions tab → Run workflow. First push creates resources and deploys from the latest upstream release. Subsequent pushes redeploy. Docker users skip all of this and run `docker compose up`. @@ -239,7 +239,7 @@ Each `docs/deploy/.md` follows the same 4-section template: 1. **Prerequisites** — Turso DB, GitHub fork, platform-specific credentials 2. **Add GitHub Secrets** — target-specific list -3. **Trigger deploy** — push to `master` or Actions → Run workflow +3. **Trigger deploy** — push to `main` or Actions → Run workflow 4. **First-boot storage setup** — sign up as admin, add an S3 bucket via Admin → Storages 5. **Configuration & cost** — custom domain, SSL, free-tier limits @@ -315,7 +315,7 @@ The one user-level polish item still in v2.5 scope. ## User Scenarios **Indie dev with an AWS account:** -> I fork ZPan on GitHub, add five secrets (AWS creds, Turso URL + token), push to master. The deploy-aws-lambda workflow creates my Lambda function, wires up the Function URL, applies Turso migrations, and auto-generates `BETTER_AUTH_SECRET`. Ten minutes later I have a live URL in the workflow's run summary. I open it, sign up as first admin, and add my S3 bucket via the Storage settings page. Upgrades are automatic — the workflow pulls the latest upstream release on every push. +> I fork ZPan on GitHub, add five secrets (AWS creds, Turso URL + token), push to main. The deploy-aws-lambda workflow creates my Lambda function, wires up the Function URL, applies Turso migrations, and auto-generates `BETTER_AUTH_SECRET`. Ten minutes later I have a live URL in the workflow's run summary. I open it, sign up as first admin, and add my S3 bucket via the Storage settings page. Upgrades are automatic — the workflow pulls the latest upstream release on every push. **Vercel-native blogger:** > Fork, add Turso + Vercel secrets, push. The deploy-vercel workflow provisions my Vercel project, runs migrations, deploys. My personal image host is live at `zpan-mine.vercel.app` in under 5 minutes. I sign up, paste my Cloudflare R2 bucket credentials into Admin → Storages, and start uploading. Later I map `img.myblog.com` via Vercel's dashboard. diff --git a/package.json b/package.json index 529ad344..a529c2de 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "dev": "CLOUDFLARE_ENV=staging vite dev", "dev:node": "node --env-file=.dev.vars node_modules/vite/bin/vite.js dev --mode node", - "build": "[ \"$WORKERS_CI\" = \"1\" ] && [ \"$WORKERS_CI_BRANCH\" != \"master\" ] && export CLOUDFLARE_ENV=staging; vite build", + "build": "[ \"$WORKERS_CI\" = \"1\" ] && [ \"$WORKERS_CI_BRANCH\" != \"main\" ] && export CLOUDFLARE_ENV=staging; vite build", "build:node": "vite build --mode node && tsup server/entry-node.ts --config server/tsup.config.mjs --format esm --outDir dist-server --external better-sqlite3 --external @libsql/client", "build:lambda": "tsup server/entry-lambda.ts --config server/tsup.config.mjs --format cjs --outDir dist-lambda --external @libsql/client", "build:vercel": "vite build --mode node && tsup server/entry-vercel.ts --config server/tsup.config.mjs --format esm --outDir api --external @libsql/client", diff --git a/scripts/check-release-version.mjs b/scripts/check-release-version.mjs index 285149b9..064aaf5e 100644 --- a/scripts/check-release-version.mjs +++ b/scripts/check-release-version.mjs @@ -16,14 +16,14 @@ Don't tag manually — use the release script, which bumps package.json, commits and tags in one step: pnpm release ${version} - git push origin master ${tag} + git push origin main ${tag} To recover from this failed release, delete the bad tag and redo it properly: git tag -d ${tag} git push origin :refs/tags/${tag} pnpm release ${version} - git push origin master ${tag} + git push origin main ${tag} `) process.exit(1) } diff --git a/scripts/release.mjs b/scripts/release.mjs index cf07cb1d..aae9e2db 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -21,4 +21,4 @@ execFileSync('git', ['add', 'package.json'], { stdio: 'inherit' }) execFileSync('git', ['commit', '-m', `chore(release): ${tag}`], { stdio: 'inherit' }) execFileSync('git', ['tag', tag], { stdio: 'inherit' }) -console.log(`Created release commit and tag ${tag}. Push with: git push origin master ${tag}`) +console.log(`Created release commit and tag ${tag}. Push with: git push origin main ${tag}`) diff --git a/shared/constants.ts b/shared/constants.ts index dbfff233..1a745f73 100644 --- a/shared/constants.ts +++ b/shared/constants.ts @@ -47,7 +47,7 @@ export const ZPAN_CLOUD_URL_DEFAULT = 'https://cloud.zpan.space' export const ZPAN_GITHUB_URL = 'https://github.com/saltbo/zpan' // The About page renders this hand-maintained, product-facing changelog in a // side drawer; raw.githubusercontent.com serves the file with CORS. -export const ZPAN_CHANGELOG_RAW_URL = 'https://raw.githubusercontent.com/saltbo/zpan/master/CHANGELOG.md' +export const ZPAN_CHANGELOG_RAW_URL = 'https://raw.githubusercontent.com/saltbo/zpan/main/CHANGELOG.md' // The latest-version indicator comes from the newest published GitHub Release // (tag_name), not the changelog file — releases are the source of truth for // "what's the latest shipped version".