mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 18:15:33 +00:00
deployment/install.sh (curl | bash) and install.ps1 (irm | iex) check for Docker, install uv when it is missing or older than 0.8 (pinned 0.12.15 via Astral's installer), install or upgrade the docsgpt package with `uv tool install`, and hand the terminal to `docsgpt up` with any arguments. On Linux without Docker the shell installer offers get.docker.com. Both run entirely inside a function, so a download cut short runs nothing. Releases attach both scripts next to the Compose file, which is where docs.ac/install and docs.ac/install.ps1 will point. installer-lint.yml runs shellcheck and the PowerShell parser; docker-image-verify.yml now installs through install.sh. README, Quickstart, Docker-Deploying and the changelog lead with the one-liner.
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Lint the installers
|
|
|
|
# deployment/install.sh runs as `curl | bash` on macOS (bash 3.2) and Linux, and
|
|
# deployment/install.ps1 as `irm | iex` on Windows; a syntax error in either
|
|
# breaks every install at once. The end-to-end run through install.sh is in
|
|
# docker-image-verify.yml.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'deployment/install.sh'
|
|
- 'deployment/install.ps1'
|
|
- '.github/workflows/installer-lint.yml'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'deployment/install.sh'
|
|
- 'deployment/install.ps1'
|
|
- '.github/workflows/installer-lint.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: shellcheck install.sh
|
|
run: |
|
|
bash -n deployment/install.sh
|
|
shellcheck --shell=bash deployment/install.sh
|
|
|
|
- name: Parse install.ps1
|
|
shell: pwsh
|
|
run: |
|
|
$tokens = $null
|
|
$errors = $null
|
|
[System.Management.Automation.Language.Parser]::ParseFile("$PWD/deployment/install.ps1", [ref]$tokens, [ref]$errors) | Out-Null
|
|
if ($errors.Count) {
|
|
$errors | ForEach-Object { Write-Host "install.ps1:$($_.Extent.StartLineNumber): $($_.Message)" }
|
|
exit 1
|
|
}
|
|
Write-Host 'install.ps1 parses'
|