build: sign Coolify desktop updater artifacts
Some checks failed
Desktop Release / Bootstrap updater signing key (push) Has been cancelled
Desktop Release / Windows x64 NSIS (push) Has been cancelled
Desktop Release / Linux x64 DEB + AppImage (push) Has been cancelled
Desktop Release / Publish public desktop release (push) Has been cancelled
Some checks failed
Desktop Release / Bootstrap updater signing key (push) Has been cancelled
Desktop Release / Windows x64 NSIS (push) Has been cancelled
Desktop Release / Linux x64 DEB + AppImage (push) Has been cancelled
Desktop Release / Publish public desktop release (push) Has been cancelled
This commit is contained in:
parent
95d6eef866
commit
6e8fbe08ed
@ -21,7 +21,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
|
|||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
|
||||||
ENV PATH="/root/.cargo/bin:$PATH"
|
ENV PATH="/root/.cargo/bin:$PATH"
|
||||||
# Keep Rust/Tauri builds from saturating the small app server.
|
|
||||||
ENV CARGO_BUILD_JOBS=1
|
ENV CARGO_BUILD_JOBS=1
|
||||||
|
|
||||||
RUN rustup target add x86_64-pc-windows-msvc \
|
RUN rustup target add x86_64-pc-windows-msvc \
|
||||||
@ -32,22 +31,23 @@ RUN npm install
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Signed updater artifacts are produced by the release pipeline once its
|
RUN test -n "$TAURI_SIGNING_PRIVATE_KEY"
|
||||||
# persistent signing key is available. This builder intentionally packages
|
|
||||||
# the desktop app itself without creating updater signatures.
|
|
||||||
RUN node -e "const fs=require('fs'); const p='src-tauri/tauri.conf.json'; const c=JSON.parse(fs.readFileSync(p,'utf8')); c.bundle.createUpdaterArtifacts=false; fs.writeFileSync(p, JSON.stringify(c,null,2)+'\\n')"
|
|
||||||
|
|
||||||
RUN nice -n 10 npm run bundle:windows
|
RUN nice -n 10 npm run bundle:windows
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
mkdir -p /desktop-artifacts; \
|
mkdir -p /desktop-artifacts; \
|
||||||
win="$(find src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis -maxdepth 1 -type f -name '*-setup.exe' -print -quit)"; \
|
win="$(find src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis -maxdepth 1 -type f -name '*-setup.exe' -print -quit)"; \
|
||||||
|
sig="$(find src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis -maxdepth 1 -type f -name '*-setup.exe.sig' -print -quit)"; \
|
||||||
test -n "$win"; \
|
test -n "$win"; \
|
||||||
|
test -n "$sig"; \
|
||||||
cp "$win" /desktop-artifacts/fieldlens-print-windows-x64-setup.exe; \
|
cp "$win" /desktop-artifacts/fieldlens-print-windows-x64-setup.exe; \
|
||||||
|
cp "$sig" /desktop-artifacts/fieldlens-print-windows-x64-setup.exe.sig; \
|
||||||
|
curl -fsSL https://fieldlens-desktop-linux-build.arrowstack.dev/fieldlens-print-linux-x64.AppImage.sig -o /desktop-artifacts/fieldlens-print-linux-x64.AppImage.sig; \
|
||||||
win_sha="$(sha256sum /desktop-artifacts/fieldlens-print-windows-x64-setup.exe | awk '{print $1}')"; \
|
win_sha="$(sha256sum /desktop-artifacts/fieldlens-print-windows-x64-setup.exe | awk '{print $1}')"; \
|
||||||
sha256sum /desktop-artifacts/fieldlens-print-windows-x64-setup.exe > /desktop-artifacts/SHA256SUMS; \
|
sha256sum /desktop-artifacts/fieldlens-print-windows-x64-setup.exe > /desktop-artifacts/SHA256SUMS; \
|
||||||
version="$(node -p "require('./package.json').version")"; \
|
version="$(node -p "require('./package.json').version")"; \
|
||||||
printf '{\n "version": "%s",\n "notes": "FieldLens Print desktop update",\n "downloads": {\n "windows-x86_64": {\n "url": "https://fieldlens.arrowstack.dev/downloads/fieldlens-print-windows-x64-setup.exe",\n "sha256": "%s"\n },\n "linux-x86_64-deb": {\n "url": "https://fieldlens-desktop-linux-build.arrowstack.dev/fieldlens-print-linux-x64.deb"\n }\n }\n}\n' "$version" "$win_sha" > /desktop-artifacts/release.json
|
printf '{\n "version": "%s",\n "notes": "FieldLens Print desktop update",\n "downloads": {\n "windows-x86_64": {\n "url": "https://fieldlens.arrowstack.dev/downloads/fieldlens-print-windows-x64-setup.exe",\n "sha256": "%s"\n },\n "linux-x86_64-deb": {\n "url": "https://fieldlens.arrowstack.dev/downloads/fieldlens-print-linux-x64.deb"\n }\n }\n}\n' "$version" "$win_sha" > /desktop-artifacts/release.json; \
|
||||||
|
VERSION="$version" node -e 'const fs=require("fs"); const version=process.env.VERSION; const platforms={ "windows-x86_64": { signature: fs.readFileSync("/desktop-artifacts/fieldlens-print-windows-x64-setup.exe.sig","utf8").trim(), url:"https://fieldlens.arrowstack.dev/downloads/fieldlens-print-windows-x64-setup.exe" }, "linux-x86_64": { signature: fs.readFileSync("/desktop-artifacts/fieldlens-print-linux-x64.AppImage.sig","utf8").trim(), url:"https://fieldlens.arrowstack.dev/downloads/fieldlens-print-linux-x64.AppImage" } }; fs.writeFileSync("/desktop-artifacts/latest.json", JSON.stringify({version,notes:"FieldLens Print desktop update",platforms},null,2)+"\n");'
|
||||||
|
|
||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.27-alpine
|
||||||
COPY --from=build /desktop-artifacts /usr/share/nginx/html
|
COPY --from=build /desktop-artifacts /usr/share/nginx/html
|
||||||
|
|||||||
@ -17,7 +17,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
|
|||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
|
||||||
ENV PATH="/root/.cargo/bin:$PATH"
|
ENV PATH="/root/.cargo/bin:$PATH"
|
||||||
# Keep Rust/Tauri builds from saturating the small app server.
|
|
||||||
ENV CARGO_BUILD_JOBS=1
|
ENV CARGO_BUILD_JOBS=1
|
||||||
|
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
@ -25,17 +24,23 @@ RUN npm install
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN node -e "const fs=require('fs'); const p='src-tauri/tauri.conf.json'; const c=JSON.parse(fs.readFileSync(p,'utf8')); c.bundle.createUpdaterArtifacts=false; fs.writeFileSync(p, JSON.stringify(c,null,2)+'\\n')"
|
RUN cargo test --manifest-path src-tauri/Cargo.toml --lib
|
||||||
|
RUN test -n "$TAURI_SIGNING_PRIVATE_KEY"
|
||||||
RUN nice -n 10 npm run bundle:deb
|
RUN nice -n 10 npm run bundle:linux
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
mkdir -p /desktop-artifacts; \
|
mkdir -p /desktop-artifacts; \
|
||||||
deb="$(find src-tauri/target/release/bundle/deb -maxdepth 1 -type f -name '*.deb' -print -quit)"; \
|
deb="$(find src-tauri/target/release/bundle/deb -maxdepth 1 -type f -name '*.deb' -print -quit)"; \
|
||||||
|
appimage="$(find src-tauri/target/release/bundle/appimage -maxdepth 1 -type f -name '*.AppImage' -print -quit)"; \
|
||||||
|
sig="$(find src-tauri/target/release/bundle/appimage -maxdepth 1 -type f -name '*.AppImage.sig' -print -quit)"; \
|
||||||
test -n "$deb"; \
|
test -n "$deb"; \
|
||||||
|
test -n "$appimage"; \
|
||||||
|
test -n "$sig"; \
|
||||||
cp "$deb" /desktop-artifacts/fieldlens-print-linux-x64.deb; \
|
cp "$deb" /desktop-artifacts/fieldlens-print-linux-x64.deb; \
|
||||||
|
cp "$appimage" /desktop-artifacts/fieldlens-print-linux-x64.AppImage; \
|
||||||
|
cp "$sig" /desktop-artifacts/fieldlens-print-linux-x64.AppImage.sig; \
|
||||||
deb_sha="$(sha256sum /desktop-artifacts/fieldlens-print-linux-x64.deb | awk '{print $1}')"; \
|
deb_sha="$(sha256sum /desktop-artifacts/fieldlens-print-linux-x64.deb | awk '{print $1}')"; \
|
||||||
sha256sum /desktop-artifacts/fieldlens-print-linux-x64.deb > /desktop-artifacts/SHA256SUMS; \
|
sha256sum /desktop-artifacts/fieldlens-print-linux-x64.deb /desktop-artifacts/fieldlens-print-linux-x64.AppImage > /desktop-artifacts/SHA256SUMS; \
|
||||||
sed -E "s#EXPECTED_SHA256=\"[0-9a-f]{64}\"#EXPECTED_SHA256=\"$deb_sha\"#" downloads/install.sh > /desktop-artifacts/install.sh; \
|
sed -E "s#EXPECTED_SHA256=\"[0-9a-f]{64}\"#EXPECTED_SHA256=\"$deb_sha\"#" downloads/install.sh > /desktop-artifacts/install.sh; \
|
||||||
chmod 0755 /desktop-artifacts/install.sh; \
|
chmod 0755 /desktop-artifacts/install.sh; \
|
||||||
version="$(node -p "require('./package.json').version")"; \
|
version="$(node -p "require('./package.json').version")"; \
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"updater": {
|
"updater": {
|
||||||
"pubkey": "__FIELDLENS_UPDATER_PUBKEY__",
|
"pubkey": "RWSIKvrjYbOtAMJ4KKVh3gQEwQf2v4IMDMVL1UPHOS3elKTIt9SdqEKu",
|
||||||
"endpoints": [
|
"endpoints": [
|
||||||
"https://fieldlens.arrowstack.dev/downloads/latest.json"
|
"https://fieldlens.arrowstack.dev/downloads/latest.json"
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user