fix(packaging): keep source clients in lockstep

This commit is contained in:
Xubin Ren
2026-08-17 20:56:10 +08:00
parent 78802c4c4e
commit 7384fbfffc
11 changed files with 175 additions and 45 deletions
+4 -5
View File
@@ -8,7 +8,6 @@ param(
$ErrorActionPreference = "Stop"
$Package = "nanobot-ai"
$MainSource = "https://github.com/HKUDS/nanobot/archive/refs/heads/main.zip"
$InstallTarget = $Package
$InstallSource = "PyPI"
$script:NanobotRunner = $null
@@ -38,11 +37,12 @@ function Show-InstallFailureHint {
}
function Show-Usage {
Write-Host "Usage: install.ps1 [-Dev|--dev] [-DryRun|--dry-run]"
Write-Host "Usage: install.ps1 [-DryRun|--dry-run]"
Write-Host ""
Write-Host "By default this installs or upgrades nanobot-ai from PyPI."
Write-Host "Use --dev to install from the current main branch on GitHub."
Write-Host "Use --dry-run to print what would happen without installing or starting setup."
Write-Host ""
Write-Host "For current main, clone the repository and run 'python -m pip install -e .'."
}
function Test-Python {
@@ -245,8 +245,7 @@ foreach ($Arg in $RemainingArgs) {
}
if ($Dev) {
$InstallTarget = $MainSource
$InstallSource = "GitHub main"
Fail "--dev installed an untracked main snapshot and is no longer supported; clone the repository and run 'python -m pip install -e .' instead."
}
$Python = Find-Python
+4 -5
View File
@@ -2,7 +2,6 @@
set -eu
package="nanobot-ai"
main_source="https://github.com/HKUDS/nanobot/archive/refs/heads/main.zip"
install_target="$package"
install_source="PyPI"
dry_run="0"
@@ -32,11 +31,12 @@ install_failure_hint() {
usage() {
cat <<'EOF'
Usage: install.sh [--dev] [--dry-run]
Usage: install.sh [--dry-run]
By default this installs or upgrades nanobot-ai from PyPI.
Use --dev to install from the current main branch on GitHub.
Use --dry-run to print what would happen without installing or starting setup.
For current main, clone the repository and run `python -m pip install -e .`.
EOF
}
@@ -200,8 +200,7 @@ PY
while [ "$#" -gt 0 ]; do
case "$1" in
--dev)
install_target="$main_source"
install_source="GitHub main"
fail "--dev installed an untracked main snapshot and is no longer supported; clone the repository and run 'python -m pip install -e .' instead"
;;
--dry-run)
dry_run="1"