Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

ci(desktop): stop publishing install scripts in desktop releases

Dongdong Chen6f437f551324
diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml
index 04a1108d..ab3022fd 100644
--- a/.github/workflows/desktop-release.yml
+++ b/.github/workflows/desktop-release.yml
@@ -318,7 +318,6 @@ jobs:
export DESKTOP_UPDATE_KEY="$key"
fi
scripts/ci/desktop-release.sh manifest release "${{ needs.prepare.outputs.version }}"
- - run: scripts/ci/desktop-release.sh install-scripts release "${{ needs.prepare.outputs.version }}"
- run: scripts/ci/desktop-release.sh checksums release "${{ needs.prepare.outputs.version }}"
# GITHUB_TOKEN can write only this repository; a release in another one
# takes LINGER_RELEASE_TOKEN, which prepare checked.
diff --git a/docs/desktop-release.md b/docs/desktop-release.md
index 4dba73ae..b7ffe0bd 100644
--- a/docs/desktop-release.md
+++ b/docs/desktop-release.md
@@ -185,7 +185,6 @@ linked; verify the file bytes and Agent logs separately with
| `Linger-<version>-windows-x64-setup.exe` | Windows x64 per-user installer |
| `Linger-<version>-windows-x64-portable.zip` | Windows x64 folder to run without installing |
| `Linger-<version>-macos-arm64.app.tar.gz` | macOS app the updater swaps in |
-| `install.sh`, `install.ps1` | guided local-model & Computer installer scripts |
| `manifest.json`, `manifest.json.sig` | only with the update key: the [auto-update](#auto-update) feed |
| `SHA256SUMS.txt` | SHA-256 of every file above |
diff --git a/scripts/ci/desktop-release.sh b/scripts/ci/desktop-release.sh
index 44e3f9fd..6a840d38 100755
--- a/scripts/ci/desktop-release.sh
+++ b/scripts/ci/desktop-release.sh
@@ -16,9 +16,6 @@ set -euo pipefail
# desktop-release.sh build <target> fetch-native, compile and package
# desktop-release.sh manifest <dir> <version> write the signed update manifest
# (manifest.json and .sig) into <dir>
-# desktop-release.sh install-scripts <dir> <version>
-# verify stack pins and copy install.sh
-# and install.ps1 into <dir>
# desktop-release.sh checksums <dir> <version> write <dir>/SHA256SUMS.txt
# desktop-release.sh gitlab-upload <dir> <version>
# upload <dir>'s files to a GitLab generic
@@ -70,7 +67,7 @@ die() {
usage() {
echo "Usage: $0 version <tag> | fetch-native|compile|package|build <target>" \
- "| manifest|install-scripts|checksums <dir> <version> | github-release <dir> <tag> <version>" \
+ "| manifest|checksums <dir> <version> | github-release <dir> <tag> <version>" \
"| gitlab-upload <dir> <version>" >&2
exit 2
}
@@ -346,22 +343,9 @@ NODE
die "could not write the update manifest"
}
-cmd_install_scripts() {
- local dir="${1:-}" version="${2:-}"
- [[ -d "$dir" && "$version" =~ $version_pattern ]] ||
- die "install-scripts needs the folder holding the release files and the release version"
- command -v node >/dev/null || die "install-scripts needs Node.js (node)"
- node "$repo_root/scripts/sync-install-stack-pin.mjs" --root "$repo_root" --check
- cp "$repo_root/scripts/install/install.sh" "$dir/install.sh"
- cp "$repo_root/scripts/install/install.ps1" "$dir/install.ps1"
- chmod 0755 "$dir/install.sh"
- chmod 0644 "$dir/install.ps1"
- echo "desktop-release: copied install.sh and install.ps1 for $version"
-}
-
# Every release ships the three installers; SHA256SUMS.txt covers each file
-# of the version, guided installer scripts, extra ones such as the portable
-# zip and the app archive, and the update manifest and its signature when there are.
+# of the version, extra ones such as the portable zip and the app archive,
+# and the update manifest and its signature when there are.
cmd_checksums() {
local dir="${1:-}" version="${2:-}" required file files=()
[[ -d "$dir" ]] || die "checksums needs the folder holding the release files"
@@ -371,7 +355,7 @@ cmd_checksums() {
done
while IFS= read -r file; do
files+=("$(basename "$file")")
- done < <(find "$dir" -maxdepth 1 -type f \( -name "Linger-$version-*" -o -name install.sh -o -name install.ps1 -o -name manifest.json -o -name manifest.json.sig \) | LC_ALL=C sort)
+ done < <(find "$dir" -maxdepth 1 -type f \( -name "Linger-$version-*" -o -name manifest.json -o -name manifest.json.sig \) | LC_ALL=C sort)
: >"$dir/SHA256SUMS.txt.part"
for file in "${files[@]}"; do
printf '%s %s\n' "$(sha256_of "$dir/$file")" "$file" >>"$dir/SHA256SUMS.txt.part"
@@ -457,7 +441,6 @@ case "$command" in
package) cmd_package "$@" ;;
build) cmd_build "$@" ;;
manifest) cmd_manifest "$@" ;;
- install-scripts) cmd_install_scripts "$@" ;;
checksums) cmd_checksums "$@" ;;
gitlab-upload) cmd_gitlab_upload "$@" ;;
github-release) cmd_github_release "$@" ;;
diff --git a/scripts/ci/desktop-release.test.ts b/scripts/ci/desktop-release.test.ts
index 747262e8..d7b42ea9 100644
--- a/scripts/ci/desktop-release.test.ts
+++ b/scripts/ci/desktop-release.test.ts
@@ -8,7 +8,6 @@ import {
mkdtempSync,
readFileSync,
rmSync,
- statSync,
writeFileSync,
} from "node:fs";
import { tmpdir } from "node:os";
@@ -88,6 +87,8 @@ describe("desktop-release.sh checksums", () => {
const files = [...required, `Linger-${version}-windows-x64-portable.zip`];
for (const name of files) writeFileSync(join(dir, name), name);
writeFileSync(join(dir, "Linger-0.16.32-macos-arm64.dmg"), "older");
+ writeFileSync(join(dir, "install.sh"), "#!/bin/sh\n");
+ writeFileSync(join(dir, "install.ps1"), "# ps1\n");
const result = run(["checksums", dir, version]);
@@ -385,74 +386,3 @@ describe("desktop-release.sh github-release", () => {
expect(result.stderr).toContain("owner/name");
});
});
-
-describe("desktop-release.sh install-scripts", () => {
- const version = "0.16.33";
-
- it("exports verified install.sh and install.ps1 and covers them in SHA256SUMS.txt", () => {
- const dir = folder();
- for (const suffix of [
- "macos-arm64.dmg",
- "linux-x64.tar.gz",
- "windows-x64-setup.exe",
- ]) {
- writeFileSync(join(dir, `Linger-${version}-${suffix}`), suffix);
- }
-
- const exported = run(["install-scripts", dir, version]);
- expect(exported.status).toBe(0);
- expect(exported.stdout).toContain(
- `copied install.sh and install.ps1 for ${version}`,
- );
- expect(statSync(join(dir, "install.sh")).mode & 0o111).toBe(0o111);
- expect(existsSync(join(dir, "install.ps1"))).toBe(true);
-
- const sums = run(["checksums", dir, version]);
- expect(sums.status).toBe(0);
- const checksumText = readFileSync(join(dir, "SHA256SUMS.txt"), "utf8");
- const shHash = createHash("sha256")
- .update(readFileSync(join(process.cwd(), "scripts/install/install.sh")))
- .digest("hex");
- const ps1Hash = createHash("sha256")
- .update(readFileSync(join(process.cwd(), "scripts/install/install.ps1")))
- .digest("hex");
- expect(checksumText).toContain(`${shHash} install.sh\n`);
- expect(checksumText).toContain(`${ps1Hash} install.ps1\n`);
- });
-
- it("refuses install-scripts when standalone pins drift from scripts/installs", () => {
- const checkout = folder();
- for (const rel of ["scripts/ci", "scripts/install", "scripts/installs"]) {
- mkdirSync(join(checkout, rel), { recursive: true });
- }
- for (const file of [
- "scripts/ci/desktop-release.sh",
- "scripts/sync-install-stack-pin.mjs",
- "scripts/installs/stack.sh",
- "scripts/installs/stack.ps1",
- "scripts/install/install.sh",
- "scripts/install/install.ps1",
- ]) {
- copyFileSync(join(process.cwd(), file), join(checkout, file));
- }
- const driftedSh = readFileSync(
- join(checkout, "scripts/install/install.sh"),
- "utf8",
- ).replace(
- /STACK_PIN_SHA256='[a-f0-9]+'/,
- `STACK_PIN_SHA256='${"0".repeat(64)}'`,
- );
- writeFileSync(join(checkout, "scripts/install/install.sh"), driftedSh);
-
- const dir = folder();
- const result = run(
- ["install-scripts", dir, version],
- {},
- join(checkout, "scripts/ci/desktop-release.sh"),
- );
-
- expect(result.status).toBe(1);
- expect(result.stderr).toContain("Stack release pin drift");
- expect(existsSync(join(dir, "install.sh"))).toBe(false);
- });
-});
diff --git a/scripts/installs/README.md b/scripts/installs/README.md
index c295ec3d..9a56028d 100644
--- a/scripts/installs/README.md
+++ b/scripts/installs/README.md
@@ -6,7 +6,8 @@ tests and release tools stay in their own repository, and the pipeline rewrites
only its scripts and its marked section below. After updating `stack.sh` and
`stack.ps1`, run `node scripts/sync-install-stack-pin.mjs --write` so
`scripts/install/install.sh` and `scripts/install/install.ps1` keep matching
-release pins.
+release pins for standalone use outside a repository checkout (Desktop GitHub
+Releases do not attach those scripts).
## Your own API keys: `user.env`