Move to GitHub: ELY-Open-Source/ELYTerminal, Ely from GitHub, CI on the org's runners, releases and the update check through GitHub

This commit is contained in:
雷电芽衣 committed 2026-10-19 20:26:38 -04:00
1 parent 7d06bdec8a
commit 616bec2615
10 files changed
+44 -74

No files matched your search

+17 -26
View File
@@ -7,7 +7,7 @@ on:
jobs:
macos:
runs-on: macos-latest
runs-on: [self-hosted, macos-arm64]
steps:
- uses: actions/checkout@v7
# The runner's PATH lacks the host's rustup.
@@ -16,36 +16,27 @@ jobs:
- run: scripts/check.sh
- run: cargo build --locked
platforms:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-latest]
runs-on: ${{ matrix.os }}
# Debuginfo makes the Linux link outgrow its VM's memory.
windows:
runs-on: [self-hosted, ely-windows]
env:
CARGO_PROFILE_DEV_DEBUG: 0
steps:
- uses: actions/checkout@v7
# The job container comes without rustup.
- if: runner.os == 'Linux'
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain none
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- run: rustup toolchain install --no-self-update
# On a host runner its post step deletes the host's rustup.
- if: runner.os == 'Linux'
uses: Swatinem/rust-cache@v2
- if: runner.os != 'Linux'
run: cargo test --locked --quiet
# The Linux job container runs as root, which ignores the file permissions the tests check.
- if: runner.os == 'Linux'
run: |
apt-get update && apt-get install -y --no-install-recommends pkg-config libwayland-dev \
- run: cargo test --locked --quiet
- run: cargo build --locked
linux:
runs-on: ubuntu-24.04
env:
CARGO_PROFILE_DEV_DEBUG: 0
steps:
- uses: actions/checkout@v7
- run: rustup toolchain install --no-self-update
- uses: Swatinem/rust-cache@v2
- run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends pkg-config libwayland-dev \
libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev libx11-xcb-dev libfontconfig-dev \
libfreetype-dev zsh fish xvfb
useradd --create-home ci
chmod o+x "$HOME"
chown -R ci "$GITHUB_WORKSPACE" "$HOME/.cargo" "$HOME/.rustup"
runuser -u ci -- env HOME=/home/ci CARGO_HOME="$HOME/.cargo" RUSTUP_HOME="$HOME/.rustup" PATH="$PATH" cargo test --locked --quiet
- run: cargo test --locked --quiet
- run: cargo build --locked
+4 -3
View File
@@ -7,7 +7,9 @@ on:
jobs:
macos:
# The owner's login session, whose keychain holds the Developer ID identity.
runs-on: macos-signing
runs-on: [self-hosted, macos-signing]
permissions:
contents: write
steps:
- uses: actions/checkout@v7
# The runner's PATH lacks the host's rustup.
@@ -26,8 +28,7 @@ jobs:
scripts/mac-app.sh
- name: Put the disk image on the release
env:
RELEASE_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version=$(cargo pkgid)
scripts/release-asset.sh "target/release/ELYTerminal-${version##*[#@]}.dmg"
+5 -4
View File
@@ -5,7 +5,7 @@ ELYTerminal. A terminal on GPUI and Ely components. `PRD.md` says what it does;
## Stack
- Rust 1.95.0, as `rust-toolchain.toml` pins it, edition 2024. One binary crate, `elyterminal`.
- Ely (`ely-gpui-component`) from git.zacharyzhang.com, pinned by rev. gpui and gpui_platform from crates.io's `gpui-pre`, the exact version Ely pins, under their crate names through `package`.
- Ely (`ely-gpui-component`) from github.com/ELY-Open-Source, pinned by rev. gpui and gpui_platform from crates.io's `gpui-pre`, the exact version Ely pins, under their crate names through `package`.
- `alacritty_terminal` 0.26: grid, parser, pseudo-terminal, event loop.
- `serde`, `serde_json`: settings. `dirs`: the config folder. `base64`, the version alacritty pulls in for OSC 52: OSC 7501's text. `log`, `env_logger`: logs to stderr. `unicode-normalization`, on macOS: Git's marks in composed form.
- On Linux, `wayland-client`, `wayland-backend` and `wayland-protocols` (staging) ask the compositor for `ext_background_effect_v1` on gpui's own connection; `wayland-server` hosts a compositor in the tests. `x11rb` sets `_KDE_NET_WM_BLUR_BEHIND_REGION`; its test runs Xvfb.
@@ -29,7 +29,7 @@ ELYTerminal. A terminal on GPUI and Ely components. `PRD.md` says what it does;
- `scripts/mac-app.sh` builds `target/release/ELYTerminal.app` from a release build, signed ad hoc, and `ELYTerminal-VERSION.dmg` beside it, the app next to a link to Applications. Given `SIGN_IDENTITY` and the App Store Connect key, `NOTARY_KEY` (its .p8 file), `NOTARY_KEY_ID` and `NOTARY_ISSUER`, it signs with that identity under the hardened runtime, then notarizes and staples the image, and it stops before building when one is missing or no keychain holds the identity. Its icon: `examples/icons.rs` renders `assets/icons/elyterminal-macos.svg` into an iconset, which `iconutil` packs.
- `scripts/windows-zip.ps1`, on Windows with Visual Studio's C++ tools, builds `elyterminal.exe` with its icon and zips it as `ELYTerminal-VERSION-windows-ARCH.zip` in `target/release`. After an edit to the figure, `cargo run --example icons -- ico assets/icons/elyterminal.svg assets/icons/elyterminal.ico` renders the icon again.
- `scripts/linux-tar.sh` builds the release in Docker on `rust:1.95.0-bookworm` and packs it with `com.zacharyzhang.elyterminal.desktop` and the icon as `ELYTerminal-VERSION-linux-ARCH.tar.gz` in `target/release`.
- `scripts/release-asset.sh FILE` puts FILE on the Gitea release of this version, a draft too, in place of a file of its name; `RELEASE_API` and `RELEASE_TOKEN` say where and as whom. The Release workflow, `.github/workflows/release.yml`, dispatched by hand, builds the signed and notarized disk image on the `macos-signing` runner and puts it on the release.
- `scripts/release-asset.sh FILE` puts FILE on the GitHub release of this version, a draft too, in place of a file of its name, through `gh`. The Release workflow, `.github/workflows/release.yml`, dispatched by hand, builds the signed and notarized disk image on the `macos-signing` runner and puts it on the release.
## Layout
@@ -87,10 +87,10 @@ ELYTerminal. A terminal on GPUI and Ely components. `PRD.md` says what it does;
- 2026-10-15: on Wayland the window asks for `ext_background_effect_v1` beside gpui's `org_kde_kwin_blur`. A guest connection on gpui's own display binds it, takes the effect for the window's surface once, and blurs the window's pane: the surface less Ely's resize margin on each free edge of a client-drawn window, worked out each frame and sent only when it changes; it goes and comes back with Blurred and lands at the surface's next commit, which every frame makes. The guest connection reads the display only while the window opens, before gpui's loop runs, and is never dropped: a drop destroys its proxies through the display, which gpui may close first. The log names what the compositor offers, so which way blur goes: `ext_background_effect_v1`, gpui's `org_kde_kwin_blur`, or none, the desktop clear. Its test runs a `wayland-server` compositor on a socket pair.
- 2026-10-15: on a client-drawn window, so on Linux, Ely's `ResizeBorder` paints its pane solid and shadowed under the content, which kept the desktop from showing at all. `ResizeBorder::glass`, added to Ely for this, leaves the pane to the content while the window is see-through: no ground, nor the shadow gpui draws under the box, which would tint it. So the blur covers the pane alone and the resize margin stays clear. On X11 the window names its pane in `_KDE_NET_WM_BLUR_BEHIND_REGION` (CARDINAL, 32: x, y, width, height in the window's pixels), as Ghostty names its own, and drops the property when Blurred goes; KWin reads it, other compositors pass it by. It goes over a connection of ELYTerminal's own to `$DISPLAY`, which gpui opens too: a property belongs to the window, whoever sets it. gpui's own `org_kde_kwin_blur` on KDE's Wayland still covers the whole surface, margin included, beyond ELYTerminal's reach.
- 2026-10-15: the macOS menu bar is the PRD's: ELYTerminal (Settings…, Quit), Shell (New Session, Close Session), Edit (Copy, Paste, Select All, Find), View (Toggle Sessions, Toggle Right Panel, Bigger, Smaller, Reset Size), Window (Minimize, Zoom, then the windows macOS lists). An item shows the key bound to its action, so the menus are set after the bindings; Copy, Paste and Select All go through AppKit's `copy:`, `paste:` and `selectAll:`, as gpui's `OsAction` maps them. They are Ely's text input actions, which `forms` exports for this, and the terminal handles them too: gpui sends a menu's action to what holds focus and enables the item only where a handler waits, so one action serves the terminal, find and every field. The new keys are Ghostty's: Cmd-Q, Cmd-A, Cmd-= and Cmd-+, Cmd-minus, Cmd-0, Cmd-M. Off macOS Quit and Select All take Ctrl-Shift, since Ctrl with a letter types a control byte; the font's size takes plain Ctrl with =, +, minus and 0, which type none, as in Ghostty, Alacritty and Windows Terminal; Minimize has no key there. Bigger and Smaller move every session's font a point, inside the Size range, and Reset Size goes back to the setting; nothing saves the change, as in Ghostty. Select All runs from the first character in the history to the last on the screen, the blanks around them left out, as Ghostty's, though a space under a combining mark shows a character and counts as one; copy on select takes it, and a blank grid selects nothing.
- 2026-10-15: CI runs on self-hosted Gitea runners, each job with what its runner must hold. macOS runs on the host, with fish and PowerShell installed, or the two shell tests fail as they should. Windows runs on the host, with rustup's `cargo` and `rustc` proxies beside `rustup` and Visual Studio's C++ tools. Ubuntu (`ubuntu-24.04`) runs as root in `docker.gitea.com/runner-images:ubuntu-24.04`, installs the libraries gpui links, and runs the tests as a user it makes, since root ignores the file modes they check; its runner serves this repository alone, in a VM of its own, so a build cannot starve other containers. The Linux and Windows jobs build without debuginfo, as `scripts/linux.sh` does: with it, linking gpui's test binaries outgrew that VM's 8 GB. The macOS and Windows jobs run on the owner's own machines, so they skip `Swatinem/rust-cache`: its post step cleans `$CARGO_HOME`, which there is the owner's own, and after every job it deleted `rustup` from `~/.cargo/bin`, leaving its proxies pointing at nothing, and pruned the shared registry; the Linux job keeps it, inside its container. A run that waits on a missing runner stays queued: cancel stale ones before a new runner registers, or it runs every one. The shell tests type a line only once the line editor reads raw keys, canonical mode off: on CI, a line typed before PowerShell's first read was echoed by the terminal and never run. Every job installs the toolchain `rust-toolchain.toml` names with `rustup toolchain install --no-self-update` and never runs `rustup default`, so the owner's machines keep their own default toolchain and rustup; the macOS job puts the host's `~/.cargo/bin` on the runner's PATH, and the Linux container installs rustup first. A toolchain file's components install only with the toolchain: one already there without them makes each cargo call try to download them, so `scripts/linux.sh` and `scripts/linux-tar.sh` add them to their images.
- 2026-10-15: CI ran on self-hosted Gitea runners until v0.1.7, each job with what its runner must hold. macOS runs on the host, with fish and PowerShell installed, or the two shell tests fail as they should. Windows runs on the host, with rustup's `cargo` and `rustc` proxies beside `rustup` and Visual Studio's C++ tools. Ubuntu (`ubuntu-24.04`) runs as root in `docker.gitea.com/runner-images:ubuntu-24.04`, installs the libraries gpui links, and runs the tests as a user it makes, since root ignores the file modes they check; its runner serves this repository alone, in a VM of its own, so a build cannot starve other containers. The Linux and Windows jobs build without debuginfo, as `scripts/linux.sh` does: with it, linking gpui's test binaries outgrew that VM's 8 GB. The macOS and Windows jobs run on the owner's own machines, so they skip `Swatinem/rust-cache`: its post step cleans `$CARGO_HOME`, which there is the owner's own, and after every job it deleted `rustup` from `~/.cargo/bin`, leaving its proxies pointing at nothing, and pruned the shared registry; the Linux job keeps it, inside its container. A run that waits on a missing runner stays queued: cancel stale ones before a new runner registers, or it runs every one. The shell tests type a line only once the line editor reads raw keys, canonical mode off: on CI, a line typed before PowerShell's first read was echoed by the terminal and never run. Every job installs the toolchain `rust-toolchain.toml` names with `rustup toolchain install --no-self-update` and never runs `rustup default`, so the owner's machines keep their own default toolchain and rustup; the macOS job puts the host's `~/.cargo/bin` on the runner's PATH, and the Linux container installs rustup first. A toolchain file's components install only with the toolchain: one already there without them makes each cargo call try to download them, so `scripts/linux.sh` and `scripts/linux-tar.sh` add them to their images.
- 2026-10-15: on macOS 27 gpui's `Blurred` gives its NSVisualEffectView the `Selection` material, which builds no backdrop layer, so the desktop showed through sharp. `blur/macos` sets the view to `underWindowBackground` whenever the window turns Blurred: a gaussian blur of radius 30, the radius the owner's Ghostty uses; gpui's `updateLayer` still strips the material's tint and saturation. The view's presence proved nothing, so `shot` reads the radius off its backdrop layer.
- 2026-10-15: the icon is drawn by hand in SVG, flat, so one figure serves both forms: on macOS it stands on a night-purple rounded square on Apple's grid (824 of 1024, radius 185) with sparkles, the gradient grained so it does not band; on Windows and Linux it stands alone, as Papirus draws app icons. The app is `com.zacharyzhang.elyterminal`, after the owner's domain. A local build is signed ad hoc: it opens on the Mac that built it, and Gatekeeper asks once on any other; a release's is signed with the owner's Developer ID and notarized, so it opens on any Mac.
- 2026-10-15: a release is a Gitea release tagged `vVERSION` with three builds, each from its script: the macOS disk image for Apple silicon, a Windows zip and a Linux tarball for x86_64. Each window names itself `com.zacharyzhang.elyterminal` through `Window::set_app_id` as it opens: on Linux that is Wayland's app id and X11's `WM_CLASS`, which the desktop entry's name and `StartupWMClass` match, so a dock pairs the window with the icon; gpui's X11 windows read no app id from `WindowOptions`.
- 2026-10-15: a release is a GitHub release tagged `vVERSION` with three builds, each from its script: the macOS disk image for Apple silicon, a Windows zip and a Linux tarball for x86_64. Each window names itself `com.zacharyzhang.elyterminal` through `Window::set_app_id` as it opens: on Linux that is Wayland's app id and X11's `WM_CLASS`, which the desktop entry's name and `StartupWMClass` match, so a dock pairs the window with the icon; gpui's X11 windows read no app id from `WindowOptions`.
- 2026-10-15: on Windows a release build is a GUI program, so no console window opens beside it; a debug build keeps its console for the log. git then starts with `CREATE_NO_WINDOW`, or each call would open a console. Windows builds link the C runtime statically, so the executable needs no Visual C++ redistributable. gpui's build script embeds its manifest, PerMonitorV2 DPI awareness among it; `build.rs` adds the icon as resource 1, which gpui loads for each window, and stops the build when no resource compiler is found.
- 2026-10-15: the Linux tarball builds on Debian 12, in `rust:1.95.0-bookworm`: a binary asks for the glibc symbol versions it was linked against, so it is linked against an old glibc, not the builder's. `scripts/linux-tar.sh` prints the glibc its build asks for, and the README names it: 2.35 for v0.1.0, which runs on Ubuntu 22.04.
- 2026-10-15: on Windows gpui answers the system's hit test from the last frame: under the pointer, a `WindowControlArea::Drag` hitbox that nothing occludes makes it the caption, and Windows keeps the press, so no click reaches the app. In v0.1.0 every title bar control was dead so. Ely now occludes the drag region under its window buttons, which then answer as close, maximize and minimize, and under each column header's item row, whose controls get plain presses; the row stays the scroll container, and its title is a drag region of its own.
@@ -122,3 +122,4 @@ ELYTerminal. A terminal on GPUI and Ely components. `PRD.md` says what it does;
- 2026-10-19: Ely's shirt and back hair run on below the edge she holds, which a user asked for after 0.1.6, where a hop lifted her whole figure off the window and showed a gap under her collar and hands: both continue down to 340 in the icon's units, 54 below the edge at 286, past her highest lift, a hop of 31 with a press's 0.6 of one on it, so a hop shows more of her and never the gap; at rest the part below the edge lies outside her window and does not show. The shirt moves with her body, the hair with her head, as before; the hair behind her hands fills under them as she lifts.
- 2026-10-19: a double press on a session's row renames it, which a user asked for after 0.1.6. Ely's `ListItem::editor`, added to Ely for this, draws Ely's text field in the title's place; the row's first press selects the session, as ever, and its second opens the field, holding what the session is called, selected, with the focus. Enter keeps what it holds, Escape drops it, and a blur keeps it, as Windows Terminal's tab rename does; whenever the field closes while it still holds the window's focus, the shown terminal takes it, and a press that took the focus elsewhere keeps it there. A window that goes inactive blurs the field and keeps its focus there, so a field closed by that blur, focus handed to nothing, left the terminal deaf to keys once the window came back. A press inside the open field stays the field's: the row would select its session, which takes the focus to the terminal and ends the rename. The name, its ends trimmed, stands over the program's title in the row, the terminal's header and the window's title until renamed again, a program's later titles passing under it; an empty one gives the title back to the program. It lives as long as the session, and notifications keep the program's title. Each program title, each rename and its end are logged.
- 2026-10-19: on Windows 10 a blurred window's acrylic clears while the window moves or sizes, which a user asked for in issue #3 after 0.1.5, where dragging the window trailed the pointer by seconds: that DWM samples the acrylic again at each step of the move loop, while gpui draws through it every 10 ms, so the moves pile up; Windows 11's DWM does not, and keeps its acrylic. At start `RtlGetVersion` reads the build; below 22000 the main window's procedure is ELYTerminal's own, passing every message on to gpui's: at `WM_ENTERSIZEMOVE` a blurred window takes the accent gpui gives Transparent, a clear gradient, and at `WM_EXITSIZEMOVE` gpui's acrylic again, `SWP_FRAMECHANGED` telling DWM, both through `SetWindowCompositionAttribute` as gpui calls it. A window property marks the window blurred, set as the blur setting changes, so an opaque or clear window moves as it is; another marks it moving, from `WM_ENTERSIZEMOVE`, which Windows sends once, to `WM_EXITSIZEMOVE`, so a window blurred mid-move, which gpui gives acrylic at once, takes the clear accent again until the move ends. The log names which way the build goes and each switch. On Windows 11, with the build check raised, a drag by the terminal's header logged both switches and showed the glass clear mid-drag and blurred at rest; Windows 10 itself went untested, the fix following the issue's own trial.
- 2026-10-20: the repo moved from Gitea to GitHub, `ELY-Open-Source/ELYTerminal`, public, at the owner's ask: history, tags v0.1.0 to v0.1.6 and their releases with every build came along. CI runs macOS on the org's self-hosted `macos-arm64` runner, Windows on `ely-windows`, and Linux on GitHub's hosted `ubuntu-24.04`, which tests as a plain user with sudo, as Ely's CI does. Release runs on `macos-signing` and needs the repo secrets `APPLE_API_ISSUER`, `APPLE_API_KEY_ID` and `APPLE_API_KEY_P8`. The update check reads GitHub's `releases/latest`, which skips drafts and prereleases.
Generated
+1 -1
View File
@@ -1701,7 +1701,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
[[package]]
name = "ely-gpui-component"
version = "0.1.1"
source = "git+https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components.git?rev=7f7a715d797d8450eed4f17ae8002b5427d01d28#7f7a715d797d8450eed4f17ae8002b5427d01d28"
source = "git+https://github.com/ELY-Open-Source/Ely-GPUI-Components.git?rev=7f7a715d797d8450eed4f17ae8002b5427d01d28#7f7a715d797d8450eed4f17ae8002b5427d01d28"
dependencies = [
"alacritty_terminal",
"anyhow",
+2 -2
View File
@@ -5,7 +5,7 @@ edition = "2024"
rust-version = "1.95"
license = "MIT"
description = "A terminal on GPUI and Ely."
repository = "https://git.zacharyzhang.com/ZacharyZhang-NY/ELYTerminal"
repository = "https://github.com/ELY-Open-Source/ELYTerminal"
publish = false
[dependencies]
@@ -13,7 +13,7 @@ alacritty_terminal = { version = "=0.26.0", default-features = false }
anyhow = "1"
base64 = "0.22"
dirs = "7"
ely-gpui-component = { git = "https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components.git", rev = "7f7a715d797d8450eed4f17ae8002b5427d01d28" }
ely-gpui-component = { git = "https://github.com/ELY-Open-Source/Ely-GPUI-Components.git", rev = "7f7a715d797d8450eed4f17ae8002b5427d01d28" }
env_logger = "0.11"
futures = "0.3"
gethostname = "1.1.0"
+4 -4
View File
@@ -16,11 +16,11 @@ Chapters run in build order. `TASKS.md` follows them line by line.
## 2. Foundation
- One binary crate, `elyterminal`, edition 2024, Rust 1.95.
- Ely from git.zacharyzhang.com by pinned rev. gpui, gpui_platform from crates.io `gpui-pre` at the exact version Ely pins.
- Ely from github.com/ELY-Open-Source by pinned rev. gpui, gpui_platform from crates.io `gpui-pre` at the exact version Ely pins.
- `alacritty_terminal` 0.26 for the grid, the parser and the pseudo-terminal, as Ely uses it.
- Logs through `log` to stderr, `RUST_LOG` sets the level. No log setting in the app.
- CI on Gitea Actions: macOS builds, tests and lints; Ubuntu and Windows build and test.
- Repo `ELYTerminal` on git.zacharyzhang.com, private until v0.1.1, public since. No credential in any file or commit.
- CI on GitHub Actions: macOS builds, tests and lints; Ubuntu and Windows build and test.
- Repo `ELY-Open-Source/ELYTerminal` on GitHub, public; it lived on git.zacharyzhang.com until v0.1.7. No credential in any file or commit.
## 3. Settings model and storage
@@ -153,7 +153,7 @@ Cmd-, opens it; on Windows and Linux, which have no menu bar, so does a gear in
## 15. Release
- A release on Gitea, tagged `vVERSION`, carries three builds: the macOS disk image (Apple silicon, signed with Developer ID and notarized), a Windows zip (x86_64) and a Linux tarball (x86_64).
- A release on GitHub, tagged `vVERSION`, carries three builds: the macOS disk image (Apple silicon, signed with Developer ID and notarized), a Windows zip (x86_64) and a Linux tarball (x86_64).
- The Windows executable carries the icon. The Linux tarball carries the icon and a desktop entry, and the window names itself after it, `com.zacharyzhang.elyterminal`, as the macOS bundle does.
- Each build comes from its platform's script: `scripts/mac-app.sh`, `scripts/windows-zip.ps1`, `scripts/linux-tar.sh`. The macOS one runs on the signing runner, through the Release workflow.
+1 -1
View File
@@ -4,7 +4,7 @@ A terminal for macOS, Windows and Linux, in Rust on GPUI and Ely components. Ses
## Install
A release on Gitea carries three builds.
A [release on GitHub](https://github.com/ELY-Open-Source/ELYTerminal/releases) carries three builds.
- macOS 11 or later, Apple silicon: open `ELYTerminal-VERSION.dmg` and drag ELYTerminal into Applications. The app is signed with Developer ID and notarized.
- Windows 10 or later, x86_64: unzip `ELYTerminal-VERSION-windows-x86_64.zip` and run `elyterminal.exe`. It is unsigned; if SmartScreen stops it, press More info, then Run anyway.
+3 -25
View File
@@ -1,32 +1,10 @@
#!/bin/sh
# release-asset.sh FILE: puts FILE on the Gitea release of this version, a draft too, in place of one of its name.
# release-asset.sh FILE: puts FILE on the GitHub release of this version, a draft too, in place of one of its name.
set -eu
cd "$(dirname "$0")/.."
file=$1
[ -f "$file" ] || { echo "release-asset: no file $file" >&2; exit 1; }
: "${RELEASE_API:?release-asset: RELEASE_API names the repository API, https://HOST/api/v1/repos/OWNER/REPO}"
: "${RELEASE_TOKEN:?release-asset: RELEASE_TOKEN is a token that may edit the releases}"
version=$(cargo pkgid)
version=${version##*[#@]}
name=$(basename "$file")
auth="Authorization: token $RELEASE_TOKEN"
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
curl -fsS -H "$auth" "$RELEASE_API/releases?limit=50" > "$work/releases.json"
ids=$(python3 -c '
import json, sys
tag, name, path = sys.argv[1:]
found = [r for r in json.load(open(path)) if r["tag_name"] == tag]
if len(found) != 1:
sys.exit(f"release-asset: {len(found)} releases tagged {tag}")
print(found[0]["id"], *(a["id"] for a in found[0]["assets"] if a["name"] == name))
' "v$version" "$name" "$work/releases.json")
set -- $ids
release=$1
shift
for old in "$@"; do
curl -fsS -X DELETE -H "$auth" "$RELEASE_API/releases/$release/assets/$old"
echo "release-asset: removed the old $name"
done
curl -fsS -H "$auth" -F "attachment=@$file" "$RELEASE_API/releases/$release/assets?name=$name" > /dev/null
echo "release-asset: $name on release $release, v$version"
gh release upload "v$version" "$file" --clobber -R ELY-Open-Source/ELYTerminal
echo "release-asset: $(basename "$file") on release v$version"
+5 -6
View File
@@ -1,4 +1,4 @@
//! Checks for a newer release through curl and Gitea's API: at start and once a day while the settings ask, and whenever Settings asks at once.
//! Checks for a newer release through curl and GitHub's API: at start and once a day while the settings ask, and whenever Settings asks at once.
use std::{
process::{Command, Stdio},
@@ -12,8 +12,7 @@ use serde::Deserialize;
use crate::{settings::SettingsStore, workspace::TITLE};
/// The latest published release.
const LATEST: &str =
"https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/ELYTerminal/releases/latest";
const LATEST: &str = "https://api.github.com/repos/ELY-Open-Source/ELYTerminal/releases/latest";
/// How long an automatic check waits for the next.
const DAY: Duration = Duration::from_secs(24 * 60 * 60);
/// The tag a newer release's notification carries.
@@ -115,7 +114,7 @@ pub fn pressed(tag: &str, cx: &mut App) -> bool {
true
}
/// The latest release, which curl fetches from Gitea's API.
/// The latest release, which curl fetches from GitHub's API.
fn latest() -> anyhow::Result<Release> {
let mut command = Command::new("curl");
#[cfg(windows)]
@@ -198,8 +197,8 @@ mod tests {
}
#[test]
fn gitea_s_release_reads() {
let body = r#"{"id":213,"tag_name":"v0.1.5","name":"ELYTerminal 0.1.5","html_url":"https://git.zacharyzhang.com/ZacharyZhang-NY/ELYTerminal/releases/tag/v0.1.5","draft":false,"assets":[]}"#;
fn github_s_release_reads() {
let body = r#"{"id":213,"tag_name":"v0.1.5","name":"ELYTerminal 0.1.5","html_url":"https://github.com/ELY-Open-Source/ELYTerminal/releases/tag/v0.1.5","draft":false,"assets":[]}"#;
let release: Release = serde_json::from_str(body).expect("a release");
assert_eq!(release.tag_name, "v0.1.5");
assert!(release.html_url.ends_with("/releases/tag/v0.1.5"));
+2 -2
View File
@@ -23,7 +23,7 @@ What no check reached: no real KWin drew the blur; of Wayland desktops, only Hyp
| Ely by pinned rev; gpui and gpui_platform from `gpui-pre` at Ely's version | T01 | `Cargo.toml`: Ely `a2cb531`, `gpui-pre` `=0.3.8` | Pass |
| `alacritty_terminal` 0.26 | T04 | `=0.26.0` | Pass |
| Logs through `log` to stderr, `RUST_LOG` sets the level, no log setting | T01 | `src/main.rs`; no such field in `Settings` | Pass |
| CI on Gitea Actions: macOS builds, tests and lints; Ubuntu and Windows build and test | T01, T23 | `.github/workflows/ci.yml`; run 926 on `65bb4d3`, see the CI notes | Pass |
| CI on GitHub Actions: macOS builds, tests and lints; Ubuntu and Windows build and test | T01, T23 | `.github/workflows/ci.yml`; run 926 on `65bb4d3`, see the CI notes | Pass |
| The repo, private until v0.1.1 and public since; no credential in any file or commit | T01, T26 | T22's review scanned the tree and its 398 reachable objects: 0 hits; T23's scans for the Gitea token and the runners' SSH details: 0 hits; before the owner made it public, a scan of all 91 commits' contents and messages found no token, SSH password, gateway, port, SSH user or private key | Pass |
## 3. Settings model and storage
@@ -175,7 +175,7 @@ What no check reached: no real KWin drew the blur; of Wayland desktops, only Hyp
| PRD line | Task | Evidence | Status |
|---|---|---|---|
| A Gitea release, `vVERSION`, with the macOS disk image, a Windows zip and a Linux tarball | T25, T26, T27, T31, T41, T43, T47, T50, T54, T57 | `v0.1.6` at `8a9941b`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1343), signed and notarized; a first build at `9e185ea`, held back when the owner asked for the scrollbar, was replaced on the draft file by file and never published; published once CI run 1342 on `8a9941b` passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes; each binary holds the drag's, the update check's and the scrollbar's lines; the tag names `8a9941b`. `v0.1.5` at `0119776`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1312), signed and notarized; published once CI run 1311 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes; each binary holds T51's `Ely moves to the pane's` and the failed glue's line, the disk image T53's `her panel drops its titled frame` and the tarball the monitors' line; the downloaded app, run with a HOME of its own, logged her panel going borderless, 0x8081 to 0x80, and Ely on the pane's top edge; the tag names `0119776`. `v0.1.4` rebuilt for T50, at `a54f4ff`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1256), signed and notarized, each in place of the first build of its name, once CI run 1253 passed on macOS, Ubuntu and Windows on `a9be8ab`, which `a54f4ff` follows with `TASKS.md` and `tasks/reviews.md` alone; the tag moved from `2d9180e` to `a54f4ff`, and the release's target with it; the notes give the new SHA-256, add T48's fix and T49's motion, and say the builds were replaced; each file downloaded back anonymously matches its SHA-256, each binary holds the rig's log line and none the old faces' string, and the tag's source archive holds `src/pet/rig.rs` and no `src/pet/faces.rs`. The first `v0.1.4` builds, at `2d9180e`: the zip from its script on the owner's Windows VM, the tarball from its script on the owner's PC under Omarchy, the disk image from the Release workflow (run 1216), signed and notarized; published once CI run 1215 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes, each binary holds Ely's log line, and the tag named `2d9180e`. `v0.1.3` rebuilt for T43, at `eb96109`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1181), signed and notarized, each in place of the first build of its name, once CI run 1180 on that commit passed on macOS, Ubuntu and Windows; the tag moved from `7569f00` to `eb96109`, and the release's target with it; the notes give the new SHA-256 and say the builds were replaced; each file downloaded back anonymously matches its SHA-256, each binary holds the moving marks' log line and none the old ring's element id, and the tag's source archive holds `src/sessions/orb.rs`. The first `v0.1.3` builds, at `7569f00`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1157), signed and notarized; published once CI run 1156 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes, and the tag named `7569f00`. `v0.1.2` at `4364802`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1001), signed and notarized; published once CI run 1000 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes, and the tag names `4364802`. `v0.1.1` at `43ea5b1`: the zip from its script on the owner's PC, the disk image from the Release workflow, signed and notarized; the Linux tarball, rebuilt for T27 from `aae7fba` by its script on the owner's PC under Omarchy, took the first one's place, and the notes say so; each downloaded back anonymously, once the repository was public, matches the SHA-256 in the release notes. `v0.1.0` at `0075667`, its three files built from that commit by their scripts and checked again: the disk image verifies and its app passes `codesign --verify --strict`; the zip's executable has the icon and no C runtime DLL; the tarball opens its window on Ubuntu 22.04; each file downloaded back matches the SHA-256 in the release notes | Pass |
| A GitHub release, `vVERSION`, with the macOS disk image, a Windows zip and a Linux tarball | T25, T26, T27, T31, T41, T43, T47, T50, T54, T57 | `v0.1.6` at `8a9941b`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1343), signed and notarized; a first build at `9e185ea`, held back when the owner asked for the scrollbar, was replaced on the draft file by file and never published; published once CI run 1342 on `8a9941b` passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes; each binary holds the drag's, the update check's and the scrollbar's lines; the tag names `8a9941b`. `v0.1.5` at `0119776`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1312), signed and notarized; published once CI run 1311 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes; each binary holds T51's `Ely moves to the pane's` and the failed glue's line, the disk image T53's `her panel drops its titled frame` and the tarball the monitors' line; the downloaded app, run with a HOME of its own, logged her panel going borderless, 0x8081 to 0x80, and Ely on the pane's top edge; the tag names `0119776`. `v0.1.4` rebuilt for T50, at `a54f4ff`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1256), signed and notarized, each in place of the first build of its name, once CI run 1253 passed on macOS, Ubuntu and Windows on `a9be8ab`, which `a54f4ff` follows with `TASKS.md` and `tasks/reviews.md` alone; the tag moved from `2d9180e` to `a54f4ff`, and the release's target with it; the notes give the new SHA-256, add T48's fix and T49's motion, and say the builds were replaced; each file downloaded back anonymously matches its SHA-256, each binary holds the rig's log line and none the old faces' string, and the tag's source archive holds `src/pet/rig.rs` and no `src/pet/faces.rs`. The first `v0.1.4` builds, at `2d9180e`: the zip from its script on the owner's Windows VM, the tarball from its script on the owner's PC under Omarchy, the disk image from the Release workflow (run 1216), signed and notarized; published once CI run 1215 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes, each binary holds Ely's log line, and the tag named `2d9180e`. `v0.1.3` rebuilt for T43, at `eb96109`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1181), signed and notarized, each in place of the first build of its name, once CI run 1180 on that commit passed on macOS, Ubuntu and Windows; the tag moved from `7569f00` to `eb96109`, and the release's target with it; the notes give the new SHA-256 and say the builds were replaced; each file downloaded back anonymously matches its SHA-256, each binary holds the moving marks' log line and none the old ring's element id, and the tag's source archive holds `src/sessions/orb.rs`. The first `v0.1.3` builds, at `7569f00`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1157), signed and notarized; published once CI run 1156 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes, and the tag named `7569f00`. `v0.1.2` at `4364802`: the zip and the tarball from their scripts on the owner's PC and its WSL, the disk image from the Release workflow (run 1001), signed and notarized; published once CI run 1000 on that commit passed on macOS, Ubuntu and Windows; each file downloaded back anonymously matches the SHA-256 in the release notes, and the tag names `4364802`. `v0.1.1` at `43ea5b1`: the zip from its script on the owner's PC, the disk image from the Release workflow, signed and notarized; the Linux tarball, rebuilt for T27 from `aae7fba` by its script on the owner's PC under Omarchy, took the first one's place, and the notes say so; each downloaded back anonymously, once the repository was public, matches the SHA-256 in the release notes. `v0.1.0` at `0075667`, its three files built from that commit by their scripts and checked again: the disk image verifies and its app passes `codesign --verify --strict`; the zip's executable has the icon and no C runtime DLL; the tarball opens its window on Ubuntu 22.04; each file downloaded back matches the SHA-256 in the release notes | Pass |
| The Windows executable carries the icon | T25, T31, T41, T47, T50, T54, T57 | its resources: icon group 1 with the seven images of `elyterminal.ico`, 16 to 256 px, and gpui's manifest (PerMonitorV2); a GUI program, importing no C runtime DLL; on a Windows 11 VM the first 0.1.4 executable, running, showed it in the taskbar; v0.1.2's, v0.1.3's and v0.1.4's executables the same, T50's rebuild with icon and manifest byte for byte the first's; v0.1.5's executable a GUI program importing no C runtime DLL, its seven icon images, icon group 1 and manifest byte for byte 0.1.4's; v0.1.6's executable the same, its icon images, icon group and manifest byte for byte 0.1.5's | Pass |
| The Linux tarball carries the icon and a desktop entry; the window names itself `com.zacharyzhang.elyterminal` | T25, T27, T41, T47, T50, T54, T57 | on Ubuntu 22.04: `desktop-file-validate` reports nothing, every library resolves, glibc 2.35; under Xvfb `WM_CLASS` reads `com.zacharyzhang.elyterminal` twice, and under headless sway the window's `app_id` reads the same; v0.1.2's passes the same checks on Ubuntu 22.04, run in the owner's WSL, `WM_CLASS` too; T27's rebuild passes the same checks on Ubuntu 22.04, whose llvmpipe (LLVM 15) leaves the window black in a capture, the first tarball's too, while Debian 13's paints it; v0.1.3's holds the same three files, its desktop entry names `com.zacharyzhang.elyterminal`, and its binary asks for glibc 2.35 at most; v0.1.4's the same, T50's rebuild too; v0.1.5's holds the same three files, its desktop entry and icon byte for byte 0.1.4's, and its binary asks for glibc 2.35 at most; v0.1.6's holds the same three files, its desktop entry and icon byte for byte 0.1.5's, and its binary asks for glibc 2.35 at most | Pass |
| Each build comes from its script | T25, T27, T31, T41, T43, T47, T50, T54, T57 | `scripts/mac-app.sh` on macOS, `scripts/windows-zip.ps1` on the owner's Windows PC, `scripts/linux-tar.sh` in the owner's WSL, and for T27 on the owner's PC under Omarchy; v0.1.2's and v0.1.3's three the same way, and v0.1.3's again for T43, the disk image's on `macos-signing`; v0.1.4's zip on the owner's Windows VM, its tarball on the owner's PC under Omarchy, its disk image on `macos-signing`; T50's zip on the owner's PC, its tarball in the PC's WSL, its disk image on `macos-signing`; v0.1.5's three the same way: `scripts/windows-zip.ps1` on the owner's PC, `scripts/linux-tar.sh` in its WSL, `scripts/mac-app.sh` in the Release workflow on `macos-signing`; v0.1.6's three the same way, rebuilt from `8a9941b` with T58 in place of a first build from `9e185ea` that was never published | Pass |