mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 07:37:38 +00:00
RELEASE_OPS.md's Orchard loop needs ostree and flatpak to unpack the release bundles, and neither exists on macOS, where releases are cut. v1.19.0 went out from a Debian container instead; this keeps that setup. desktopApp/packaging/orchard/docker/: - Dockerfile builds orchard-publish from Orchard's v0.1.2 tag, checked against its commit, next to ostree and flatpak. - publish-orchard.sh (host, bash 3.2 is enough) reads the version from libs.versions.toml, downloads both linux .flatpak assets into build/orchard/, and runs `dry` (throwaway key, nothing leaves) or `live`. The nsec comes from ORCHARD_NSEC or ~/.orchard-nsec and the ghcr login from gh; both reach the container as environment variables, never as arguments. - publish-in-container.sh unpacks each bundle and publishes both arches. `live` first checks the key's npub against orchard.txt and refuses to push or send anything otherwise. Also gitignores desktopApp/packaging/orchard/tree/, which the listing config called gitignored but wasn't, so the manual Linux loop left a ~340 MB untracked tree in the repo. Checked on macOS: a dry run from a fresh image build gives byte-identical artifacts to the published 1.19.0 ones (693bb6f7..., 7a7ad479...), and `live` with a throwaway key refuses with exit 3 before building. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.4 KiB
Docker
30 lines
1.4 KiB
Docker
# orchard-publish next to the ostree and flatpak tools that unpack a release
|
|
# .flatpak bundle into the app tree it publishes. Neither tool exists on macOS,
|
|
# so publish-orchard.sh runs the whole publish in this image.
|
|
#
|
|
# Orchard is cloned at a tag and checked against its commit, so a moved tag
|
|
# fails the build instead of building something else. Orchard is MIT-licensed;
|
|
# it is a release tool and nothing from it ships in Amethyst.
|
|
FROM debian:trixie
|
|
|
|
ARG ORCHARD_TAG=v0.1.2
|
|
ARG ORCHARD_COMMIT=087940634e83b436f96591fec4a5cc193c704383
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates curl git build-essential pkg-config ostree flatpak \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
# The toolchain itself comes from Orchard's rust-toolchain.toml.
|
|
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none
|
|
ENV PATH=/root/.cargo/bin:$PATH
|
|
|
|
RUN git clone --quiet --depth 1 --branch "$ORCHARD_TAG" https://github.com/Letdown2491/orchard /src/orchard \
|
|
&& test "$(git -C /src/orchard rev-parse HEAD)" = "$ORCHARD_COMMIT"
|
|
WORKDIR /src/orchard
|
|
RUN cargo build --release --locked -p orchard-publish \
|
|
&& cp target/release/orchard-publish /usr/local/bin/ \
|
|
&& rm -rf target /root/.cargo/registry
|
|
|
|
COPY publish-in-container.sh /usr/local/bin/publish-in-container.sh
|
|
WORKDIR /work
|
|
ENTRYPOINT ["/usr/local/bin/publish-in-container.sh"]
|