Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
dfeffde
fix(install): keep the host's scripts current on reruns and updates
fransallen Nov 16, 2026
2072914
fix(gateway): keep the proxies up while they update
fransallen Nov 16, 2026
e52da87
feat(cli): add pyo version
fransallen Nov 16, 2026
5aa3245
fix(api): answer a missing query parameter in plain words
fransallen Nov 16, 2026
a70dd1a
docs(api): list sandboxes among an API key's access levels
fransallen Nov 16, 2026
2323203
fix(dash): show no New button to sandbox viewers
fransallen Nov 16, 2026
d0b6e5c
fix(sandbox): pull templates named by the registry's local address
fransallen Nov 16, 2026
ece6bf7
fix(registry): say how to push when an image isn't the team's
fransallen Nov 16, 2026
b9016e2
fix(sandbox): pass the base image so 0.4.0 can update
fransallen Nov 16, 2026
eed8ae2
fix(sandbox): show template build errors in plain words
fransallen Nov 16, 2026
5fa4a5f
feat(dash): warn when a template's name and image look swapped
fransallen Nov 16, 2026
bc3ff24
fix(sandbox): add base on a dev build without waiting for an update c…
fransallen Nov 16, 2026
eab0f89
feat(install): let join.sh and connect.sh take --version
fransallen Nov 16, 2026
fd6df4b
feat(api): pin this release in join and connect commands through pyo.dev
fransallen Nov 16, 2026
b0cd6f0
fix(sandbox): start one template build when two asks come at once
fransallen Nov 16, 2026
3ba0094
fix(cli): show the error a Pyo sends as plain text
fransallen Nov 16, 2026
df64072
fix(api): answer a JSON body it can't read in plain words
fransallen Nov 16, 2026
997fb36
fix(install): print each step once off a terminal
fransallen Nov 16, 2026
6763002
feat(api): list machines waiting for a Tailnet Lock signature
fransallen Nov 16, 2026
2c13596
feat(dash): show the Tailnet Lock sign command while a server joins
fransallen Nov 16, 2026
401d788
feat(sandbox): make base on a server the first time it's used there
fransallen Nov 16, 2026
32e08d8
feat(dash): show base as ready to use and start sandboxes from a temp…
fransallen Nov 16, 2026
5b5e124
feat(sandbox): run a new sandbox on a server you pick
fransallen Nov 16, 2026
e130b00
feat(dash): pick the server in New sandbox
fransallen Nov 16, 2026
0684cd3
chore: merge feat/base-on-demand into dev
fransallen Nov 16, 2026
d14bd1e
chore(dash): serve the dev server on the tailnet too
fransallen Nov 16, 2026
fe55a97
fix(build): copy install.sh into the pyo image build
fransallen Nov 16, 2026
38d19cd
style(dash): simplify the sandbox templates list
fransallen Nov 16, 2026
1f0cbdf
style(dash): show sandbox templates with logos and details on hover
fransallen Nov 16, 2026
5908706
fix(dash): stop the domain check flashing an error after deploy
fransallen Nov 16, 2026
f512cd1
style(dash): add space below the sidebar's last item
fransallen Nov 16, 2026
385042d
feat(api): give sandboxes names, renamable and searchable
fransallen Nov 16, 2026
2797c06
feat(cli): name sandboxes and rename them
fransallen Nov 16, 2026
f2036a8
feat(dash): show sandbox names, search and rename them
fransallen Nov 16, 2026
a9bbd44
feat(sandbox): let sandboxes live up to a year or until deleted
fransallen Nov 16, 2026
0e51b33
feat(cli): take longer and endless sandbox lifetimes
fransallen Nov 16, 2026
06fc8c5
feat(dash): pick any sandbox lifetime up to the team's longest
fransallen Nov 16, 2026
8dce855
feat(dash): show sandboxes without a lifetime and extend to no limit
fransallen Nov 16, 2026
c281d2c
feat(dash): show template logos in the sandboxes list
fransallen Nov 16, 2026
2e584ab
chore: merge feat/sandbox-lifetimes into dev
fransallen Nov 16, 2026
92e3077
chore: merge feat/sandbox-names into dev
fransallen Nov 16, 2026
e1ee1bb
feat(envd): run a template's /etc/pyo/start at boot
fransallen Nov 16, 2026
3370d5d
feat(sandbox): add the desktop template's image
fransallen Nov 16, 2026
36e5b01
build(release): publish sandbox-desktop and pin it in release.json
fransallen Nov 16, 2026
79a039a
feat(sandbox): let installation templates pull Pyo's own images
fransallen Nov 16, 2026
7264e52
feat(sandbox): add the built-in desktop template
fransallen Nov 16, 2026
e713b15
build(sandbox): take noVNC from its release in the desktop image
fransallen Nov 16, 2026
3e193d2
feat(sandbox): serve a sandbox port's pages through the daemon API
fransallen Nov 16, 2026
ed9b00f
build(dev): build the desktop sandbox image in pyo-up.sh
fransallen Nov 16, 2026
8b9eed1
feat(dash): show the desktop template and open its screen
fransallen Nov 16, 2026
4851ba1
fix(sandbox): start the desktop listener on a read-only disk too
fransallen Nov 16, 2026
0199e72
style: format the desktop template changes
fransallen Nov 16, 2026
1441349
test(sandbox): check desktop's size at compile time
fransallen Nov 16, 2026
2e7ce99
test(sandbox): list desktop right after base before it's added
fransallen Nov 16, 2026
9060954
style(dash): rename a sandbox from its name
fransallen Nov 16, 2026
93fa42e
style(dash): rename a sandbox in place, saved when you're done
fransallen Nov 16, 2026
ea47bdc
style(dash): fit the sandbox name field to its text
fransallen Nov 16, 2026
15fc617
style(dash): keep the name's hover look while editing it
fransallen Nov 16, 2026
1d1f9e5
fix(dash): size the name field to the name while editing
fransallen Nov 16, 2026
40a98dd
fix(dash): stop page titles cutting the name field's left corners
fransallen Nov 16, 2026
d01bc28
style(dash): hide the pencil while editing a sandbox name
fransallen Nov 16, 2026
965331b
feat(dash): open a sandbox's terminal from the list
fransallen Nov 16, 2026
ca4d523
feat(dash): open a desktop sandbox's screen from the list
fransallen Nov 16, 2026
9790642
fix(sandbox): ship all of noVNC's files in the desktop image
fransallen Nov 16, 2026
fceaffc
perf(sandbox): serve noVNC from the desktop listener at once
fransallen Nov 16, 2026
82a8783
perf(sandbox): keep the desktop's Chromium from background downloads
fransallen Nov 16, 2026
3e0102f
test(sandbox): check a WebSocket through the daemon's web route
fransallen Nov 16, 2026
6470840
feat(sandbox): bring Chromium to the front from the desktop's address
fransallen Nov 16, 2026
4d9495b
feat(dash): open Chromium in a desktop sandbox from the list
fransallen Nov 16, 2026
7cee9d6
fix(sandbox): don't send servers Pyo's local registry address
fransallen Nov 16, 2026
8bff782
fix(sandbox): let the worker know Pyo's tailnet address
fransallen Nov 16, 2026
c64fd24
feat(sandbox): refuse images made for a contract the server doesn't run
fransallen Nov 16, 2026
4184582
feat(sandbox): take the built-in templates' images from pyo-sandbox-i…
fransallen Nov 16, 2026
045f3d0
build: drop the in-repo sandbox images
fransallen Nov 16, 2026
4613a56
build(dev): build the sandbox images from a sibling checkout on request
fransallen Nov 16, 2026
b76eca0
feat(dash): show the Ubuntu logo for the base template
fransallen Nov 16, 2026
2cc01cc
docs(sandbox): describe base as Ubuntu 24.04 with a browser in desktop
fransallen Nov 16, 2026
7c9306b
feat(sandbox): report unpack progress and a template's progress alone
fransallen Nov 16, 2026
01cd513
feat(api): follow sandbox template builds live in the templates list
fransallen Nov 16, 2026
4dd9ec2
fix(dash): honor a refresh faster than the cache on a changed rate
fransallen Nov 16, 2026
9eb0fc4
feat(dash): show sandbox template progress in its status
fransallen Nov 16, 2026
bc202b8
style(dash): say pulling for sandbox and deploy images
fransallen Nov 16, 2026
79fae24
test(dash): expect pulling in the template progress label
fransallen Nov 16, 2026
23b396d
style(dash): simplify the sandbox template tooltip
fransallen Nov 17, 2026
82a054d
feat(dash): show the template tooltip in the sandboxes list and header
fransallen Nov 17, 2026
d0dab2b
fix(install): ask for root before the progress helpers
fransallen Nov 17, 2026
796533f
chore(sandbox): ship the latest base and desktop images
fransallen Nov 17, 2026
5ef3223
chore(release): 0.4.2
fransallen Nov 17, 2026
f40b0ab
test(dash): drop the test of the removed templateTitle
fransallen Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 6 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,15 @@ jobs:
run: |
cargo build --release --locked -p pyo-envd --target x86_64-unknown-linux-musl
cargo build --locked -p pyo-sandbox
# Pyo's built-in template `base`, from this branch's Dockerfile.
- name: Build the base template image
run: |
docker build -f deploy/images/sandbox-base.Dockerfile -t localhost:5000/pyo/sandbox-base:e2e deploy/images
docker push localhost:5000/pyo/sandbox-base:e2e
docker image ls localhost:5000/pyo/sandbox-base:e2e
# Pyo's built-in template `base`, from the images.json Pyo ships with
# (upsetdev/pyo-sandbox-images), pulled from ghcr.io.
- name: pyo-sandbox e2e
env:
PYO_SANDBOX_E2E: "1"
PYO_SANDBOX_E2E_BASE_IMAGE: 127.0.0.1:5000/pyo/sandbox-base:e2e
run: cargo test --locked -p pyo-sandbox --test e2e --test template_e2e -- --nocapture
run: |
PYO_SANDBOX_E2E_BASE_IMAGE=$(jq -r .images.base.ref crates/pyo-api/assets/sandbox-images/images.json)
export PYO_SANDBOX_E2E_BASE_IMAGE
cargo test --locked -p pyo-sandbox --test e2e --test template_e2e -- --nocapture
- name: pyo-api sandbox e2e
env:
PYO_SANDBOX_E2E: "1"
Expand Down Expand Up @@ -235,42 +233,6 @@ jobs:
sudo nft list ruleset | head -80 || true
ip netns list || true

# The base sandbox template's image for both architectures, built
# without pushing, when its Dockerfile changes. The release publishes it.
sandbox-base:
name: Base sandbox template image
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Did the Dockerfile change
id: changed
env:
PR_BASE: ${{ github.event.pull_request.base.sha }}
BEFORE: ${{ github.event.before }}
run: |
base=${PR_BASE:-$BEFORE}
if [ -z "$base" ] || ! git cat-file -e "$base^{commit}" 2>/dev/null ||
git diff --name-only "$base" HEAD | grep -qx deploy/images/sandbox-base.Dockerfile; then
echo "build=true" >> "$GITHUB_OUTPUT"
else
echo "Its Dockerfile didn't change."
fi
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
if: steps.changed.outputs.build == 'true'
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
if: steps.changed.outputs.build == 'true'
- name: Build
if: steps.changed.outputs.build == 'true'
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: deploy/images
file: deploy/images/sandbox-base.Dockerfile
platforms: linux/amd64,linux/arm64
push: false

waf:
name: WAF
runs-on: ubuntu-24.04
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
strategy:
fail-fast: true
matrix:
image: [pyo, agent, builder, flows, waf, geoip, db-controller, kv, static, sandbox-base]
image: [pyo, agent, builder, flows, waf, geoip, db-controller, kv, static]
# Pyo's Postgres, one image per version, from one Dockerfile.
# One repository, tagged <version>-<release>: CloudNativePG reads
# the version from the tag.
Expand All @@ -111,9 +111,6 @@ jobs:
# (deploy/images/moco), one Dockerfile with a target each.
- { image: mysql-operator, file: moco/moco, context: deploy/images/moco, target: operator }
- { image: mysql-backup, file: moco/moco, context: deploy/images/moco, target: backup }
# Pyo Sandbox's built-in template `base`. Sandbox servers run on
# both architectures, so it's built for both (arm64 under QEMU).
- { image: sandbox-base, context: deploy/images, platforms: "linux/amd64,linux/arm64" }
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
Expand Down Expand Up @@ -209,7 +206,7 @@ jobs:
tagged() { docker buildx imagetools inspect "$IMAGES/$1:$2$VERSION" --format '{{json .Manifest}}' | jq -r .digest; }
bun run scripts/release-manifest.ts --version "$VERSION" --images "$IMAGES" \
--pyo "$(digest pyo)" --agent "$(digest agent)" --builder "$(digest builder)" --flows "$(digest flows)" --waf "$(digest waf)" --geoip "$(digest geoip)" \
--db-controller "$(digest db-controller)" --kv "$(digest kv)" --static "$(digest static)" --sandbox-base "$(digest sandbox-base)" \
--db-controller "$(digest db-controller)" --kv "$(digest kv)" --static "$(digest static)" \
--mysql-operator "$(digest mysql-operator)" --mysql-backup "$(digest mysql-backup)" \
--postgres-16 "$(tagged postgres 16-)" --postgres-17 "$(tagged postgres 17-)" --postgres-18 "$(tagged postgres 18-)" \
--agent-access "$(docker run --rm "$IMAGES/agent:$VERSION@$(digest agent)" access-hash)" \
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "3"
members = ["crates/pyo-proto", "crates/pyo-api", "crates/pyo-agent", "crates/pyo-builder", "crates/pyo-cli", "crates/pyo-flows", "crates/pyo-resp", "crates/pyo-kv", "crates/pyo-db-controller", "crates/pyo-static", "crates/pyo-envd", "crates/pyo-sandbox"]

[workspace.package]
version = "0.4.1"
version = "0.4.2"
edition = "2024"
license = "Apache-2.0"
publish = false
Expand Down
29 changes: 21 additions & 8 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A version is one number for everything: `version` in the root `Cargo.toml`.

`.github/workflows/release.yml` then checks that the tag matches `Cargo.toml`,
runs the tests (the WAF's Go tests in `waf/` too), publishes signed images
to `ghcr.io/upsetdev/pyo/{pyo,agent,builder,flows,waf,geoip,db-controller,kv,postgres,mysql-operator,mysql-backup,sandbox-base}`
to `ghcr.io/upsetdev/pyo/{pyo,agent,builder,flows,waf,geoip,db-controller,kv,postgres,mysql-operator,mysql-backup}`
(all from `deploy/images/`, at the same version. The Rust binaries are
compiled once, by the `binaries` job, and the Rust images' jobs take them
from that run's build cache),
Expand Down Expand Up @@ -53,13 +53,26 @@ crates/pyo-sandbox/scripts/bundle.sh --arch x86_64 \
`sandbox.sh --bundle dist/pyo-sandbox-linux-x86_64.tar.gz` installs such a
build, with `--bundle-sha256 <its sum>` or, unchecked, `--dev`.

`sandbox-base` is Pyo Sandbox's built-in template `base`
(`deploy/images/sandbox-base.Dockerfile`), built for amd64 and arm64.
`release.json` pins it as `images.sandboxBase`, and Pyo seeds the template
from it. Sandbox servers pull it without logging in, so the release checks
that every image can be pulled anonymously. The first time a new image is
published, ghcr.io may make its package private: make it public in the
package's settings, then run the failed job again.
Installations and sandbox servers pull every image without logging in,
so the release checks that each can be pulled anonymously. The first
time a new image is published, ghcr.io may make its package private:
make it public in the package's settings, then run the failed job again.

Pyo Sandbox's built-in templates `base` and `desktop` aren't built here.
They come from [upsetdev/pyo-sandbox-images](https://github.com/upsetdev/pyo-sandbox-images),
whose signed `images.json` Pyo reads itself every hour. Pyo ships the
`images.json` of when it was built, in
`crates/pyo-api/assets/sandbox-images/` with its signature (a test checks
it), for installs that can't reach GitHub. `release.json` names those
images as `images.sandboxBase` and `images.sandboxDesktop`, as Pyo 0.4
reads them there. Before a release, take the latest:

```sh
cd crates/pyo-api/assets/sandbox-images
curl -fsSLO https://github.com/upsetdev/pyo-sandbox-images/releases/latest/download/images.json
curl -fsSLO https://github.com/upsetdev/pyo-sandbox-images/releases/latest/download/images.json.sigstore.json
cargo test -p pyo-api sandbox::images
```

`release.json` is signed with
cosign keyless as `release.json.sigstore.json` (the job needs `id-token:
Expand Down
2 changes: 1 addition & 1 deletion crates/pyo-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish.workspace = true

[dependencies]
anyhow = "1.0.104"
pyo-proto = { version = "0.4.1", path = "../pyo-proto" }
pyo-proto = { version = "0.4.2", path = "../pyo-proto" }
futures = "0.3.34"
http = "1.5.0"
k8s-openapi = { version = "0.28.0", features = ["latest"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/pyo-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ axum = { version = "0.8.9", features = ["ws"] }
axum-extra = { version = "0.12.6", features = ["cookie", "typed-header"] }
base64 = "0.23.1"
cookie = "0.18"
pyo-proto = { version = "0.4.1", path = "../pyo-proto", features = ["openapi", "sandbox-token"] }
pyo-proto = { version = "0.4.2", path = "../pyo-proto", features = ["openapi", "sandbox-token"] }
hex = "0.4.3"
hmac = "0.13.0"
jiff = "0.2.38"
Expand Down
24 changes: 17 additions & 7 deletions crates/pyo-api/assets/connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# --tailscale-key joins your tailnet first (a single-use key from Pyo)
# --registry Pyo's registry door, for images Pyo builds
# --registry-token this cluster's login there (pull only)
# --version the Pyo release, for pyo.dev to run its script (ignored here)
#
# Or only joins this machine to the tailnet (Pyo's own machine does this
# once Tailscale is set up in Pyo): --tailnet-only, with TS_AUTHKEY.
Expand Down Expand Up @@ -49,11 +50,16 @@ become_root() {
exit 1
}
# <<< pyo:become-root
# Before anything else is defined: piped in, the root shell reads on
# from here, without what came before.
# --uninstall uses kubectl as you with KUBECONFIG set, or without k3s here.
case " $* " in *" --uninstall "*) [ -n "${KUBECONFIG:-}" ] || ! command -v k3s >/dev/null || become_root "$@" ;; *) become_root "$@" ;; esac
# >>> pyo:progress (the same in deploy/install.sh, connect.sh, join.sh, scripts/pyo-up.sh and deploy/sandbox.sh)
# A long wait shows it's still going. On a terminal, one line ticks
# ("Starting Pyo… 0:42"). Elsewhere (piped, a CI log), the same line comes
# every 20 seconds. progress_start MESSAGE, then progress_tick as often as
# it likes, then progress_end.
# ("Starting Pyo… 0:42"). Elsewhere (piped, a CI log), each step's line
# comes once (not again for a step with the same line), then with its time
# every 20 seconds while it runs. progress_start MESSAGE, then
# progress_tick as often as it likes, then progress_end.
progress_start() {
PROGRESS_MSG=$1 PROGRESS_T0=$SECONDS PROGRESS_NEXT=0
progress_tick
Expand All @@ -64,8 +70,12 @@ progress_tick() {
if [ -t 1 ]; then
printf '\r\033[K%s %d:%02d' "$PROGRESS_MSG" $((t / 60)) $((t % 60))
elif [ "$t" -ge "$PROGRESS_NEXT" ]; then
printf '%s %d:%02d\n' "$PROGRESS_MSG" $((t / 60)) $((t % 60))
PROGRESS_NEXT=$((t + 20))
if [ "$PROGRESS_NEXT" -gt 0 ]; then
printf '%s %d:%02d\n' "$PROGRESS_MSG" $((t / 60)) $((t % 60))
elif [ "$PROGRESS_MSG" != "${PROGRESS_LAST:-}" ]; then
printf '%s\n' "$PROGRESS_MSG"
fi
PROGRESS_LAST=$PROGRESS_MSG PROGRESS_NEXT=$((t + 20))
fi
return 0
}
Expand Down Expand Up @@ -114,8 +124,6 @@ quietly() {
return "$rc"
}
# <<< pyo:progress
# --uninstall uses kubectl as you with KUBECONFIG set, or without k3s here.
case " $* " in *" --uninstall "*) [ -n "${KUBECONFIG:-}" ] || ! command -v k3s >/dev/null || become_root "$@" ;; *) become_root "$@" ;; esac
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive

Expand All @@ -135,6 +143,8 @@ while [ $# -gt 0 ]; do
--dry-run) DRY_RUN=1; shift ;;
# install.sh --uninstall on a k3s Pyo didn't install: Pyo itself goes too.
--with-pyo) WITH_PYO=1; shift ;;
# The release pyo.dev's wrapper ran this script from. Nothing to do here.
--version) shift 2 || shift ;;
*) echo "Unknown option: $1" >&2; exit 2 ;;
esac
done
Expand Down
22 changes: 16 additions & 6 deletions crates/pyo-api/assets/join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# --builder a build-only server: only Pyo's builder runs on it
# --registry Pyo's registry door, for images Pyo builds
# --registry-token the cluster's login there (pull only)
# --version the Pyo release, for pyo.dev to run its script (ignored here)
# >>> pyo:become-root (the same in connect.sh and join.sh)
# Root, through sudo when it isn't: the script runs again as root, with
# the same arguments and Tailscale key. Run from a file, sudo runs that
Expand All @@ -39,11 +40,15 @@ become_root() {
exit 1
}
# <<< pyo:become-root
# Before anything else is defined: piped in, the root shell reads on
# from here, without what came before.
become_root "$@"
# >>> pyo:progress (the same in deploy/install.sh, connect.sh, join.sh, scripts/pyo-up.sh and deploy/sandbox.sh)
# A long wait shows it's still going. On a terminal, one line ticks
# ("Starting Pyo… 0:42"). Elsewhere (piped, a CI log), the same line comes
# every 20 seconds. progress_start MESSAGE, then progress_tick as often as
# it likes, then progress_end.
# ("Starting Pyo… 0:42"). Elsewhere (piped, a CI log), each step's line
# comes once (not again for a step with the same line), then with its time
# every 20 seconds while it runs. progress_start MESSAGE, then
# progress_tick as often as it likes, then progress_end.
progress_start() {
PROGRESS_MSG=$1 PROGRESS_T0=$SECONDS PROGRESS_NEXT=0
progress_tick
Expand All @@ -54,8 +59,12 @@ progress_tick() {
if [ -t 1 ]; then
printf '\r\033[K%s %d:%02d' "$PROGRESS_MSG" $((t / 60)) $((t % 60))
elif [ "$t" -ge "$PROGRESS_NEXT" ]; then
printf '%s %d:%02d\n' "$PROGRESS_MSG" $((t / 60)) $((t % 60))
PROGRESS_NEXT=$((t + 20))
if [ "$PROGRESS_NEXT" -gt 0 ]; then
printf '%s %d:%02d\n' "$PROGRESS_MSG" $((t / 60)) $((t % 60))
elif [ "$PROGRESS_MSG" != "${PROGRESS_LAST:-}" ]; then
printf '%s\n' "$PROGRESS_MSG"
fi
PROGRESS_LAST=$PROGRESS_MSG PROGRESS_NEXT=$((t + 20))
fi
return 0
}
Expand Down Expand Up @@ -104,7 +113,6 @@ quietly() {
return "$rc"
}
# <<< pyo:progress
become_root "$@"
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive

Expand All @@ -119,6 +127,8 @@ while [ $# -gt 0 ]; do
--builder) BUILDER=1; shift ;;
--registry) REGISTRY="$2"; shift 2 ;;
--registry-token) REGISTRY_TOKEN="$2"; shift 2 ;;
# The release pyo.dev's wrapper ran this script from. Nothing to do here.
--version) shift 2 || shift ;;
*) echo "Unknown option: $1" >&2; exit 2 ;;
esac
done
Expand Down
Loading
Loading