Standardize repo .env loading for local scripts #275
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Only
pnpm docker:ci-checkreads repo-root.env, and only for turbo remote-cache keys. Other local scripts require inline exports (e.g.FORGEJO_TOKEN=... pnpm release:desktop:local)..env.exampledocuments turbo cache vars only.Goal
Every local script entry point that reads developer-facing env vars should bootstrap repo-root
.envbefore parsing config, with shell exports taking precedence. Document all supported vars in.env.exampleand spec.Scope
scripts/load-repo-env.mjs: addapplyRepoEnvFORGEJO_*fallbacks in publish-official-plugin-assets.env.exampleand update monorepo-scripts + release docsNon-goals
Acceptance Criteria
applyRepoEnvbefore reading env-dependent config.env.examplelists every developer-facing var with purpose and consuming command(s).envfile valuespublish-official-plugin-assetsacceptsFORGEJO_SERVER_URL/FORGEJO_REPOSITORYin addition toGITHUB_*.envcontract;make spec-lintpassesImplementation Notes
Use
applyRepoEnv(repoRoot)which merges parsed.envintoprocess.envonly for undefined keys.Suggested Files or Specs To Inspect
scripts/load-repo-env.mjs.env.examplespec/src/80-maintenance/monorepo-scripts.mdValidation Commands
Related Issues
.env.exampleprecedent)Follow-up Tasks
Implementation Summary
Added applyRepoEnv() to load-repo-env.mjs and wired repo-root .env bootstrap into release, registry, CI image, docker:ci-check, smoke, dev, notarize, electron-builder, and capture-media entry points. Expanded .env.example with documented vars; harmonized FORGEJO_* fallbacks in publish-official-plugin-assets; updated monorepo-scripts and release docs. Validated with pnpm check:all and make spec-lint.