fix bootstrap

This commit is contained in:
Muzhen Gaming
2025-10-15 22:43:10 +08:00
parent cd600fd735
commit be07225cd1
3 changed files with 102 additions and 52 deletions

View File

@@ -32,10 +32,16 @@
**Shortest Pull-and-Run**
- Host the provided `bootstrap.ps1` (repo root) as raw text, then:
`iwr -useb https://your.domain/path/bootstrap.ps1 | iex`
- Simplest one-liner (no arguments needed):
`iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap.ps1 | iex`
- Optional one-liner with API key for this run only:
`powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:OPENAI_API_KEY='sk-...'; iwr -useb https://your.domain/path/bootstrap.ps1 | iex"`
- Optional: set your API key inline for this run only:
`powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:OPENAI_API_KEY='sk-...'; iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap.ps1 | iex"`
- Before hosting, open `bootstrap.ps1` and set either `$RepoUrl` (git clone) or `$ZipUrl` (download + expand). You can also pass `-ApiKey`, `-BaseUrl`, `-Dest`, and `-Force` when invoking.
- The original parameterized script (`bootstrap-old.ps1`) is intended to be run as a file (so the `param` block works). If you prefer that version, download then execute:
1) `iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap-old.ps1 -OutFile bootstrap.ps1`
2) `powershell -NoProfile -ExecutionPolicy Bypass -File .\bootstrap.ps1`
- Before hosting, open `bootstrap-old.ps1` if you need customization (`$RepoUrl`, `$ZipUrl`, etc.). The `bootstrap.ps1` uses the default ZIP URL and destination directory and is designed specifically for `iwr ... | iex` usage.
- bootstrap-old will probably will be removed in the future