build: publish linux arm64 release artifacts
This commit is contained in:
@@ -79,11 +79,14 @@ signed:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
scripts/release build --version 1.0.0-rc.1
|
scripts/release build --version 1.0.0-rc.1
|
||||||
sha256sum -c dist/rvbox-1.0.0-rc.1/SHA256SUMS
|
(cd dist/rvbox-1.0.0-rc.1 && sha256sum -c SHA256SUMS)
|
||||||
dist/rvbox-1.0.0-rc.1/rvbox-server-linux-amd64 --version
|
dist/rvbox-1.0.0-rc.1/rvbox-server-linux-ARCH --version
|
||||||
dist/rvbox-1.0.0-rc.1/rvc-linux-amd64 --version
|
dist/rvbox-1.0.0-rc.1/rvc-linux-ARCH --version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Replace `ARCH` with `amd64` or `arm64` for the Linux host. Both variants are
|
||||||
|
created from the same pinned toolchain and have the same embedded version.
|
||||||
|
|
||||||
For a Windows-signed release, provide an executable host-side signing hook via
|
For a Windows-signed release, provide an executable host-side signing hook via
|
||||||
`--sign-windows-hook /absolute/path/to/hook`. The wrapper invokes it with the
|
`--sign-windows-hook /absolute/path/to/hook`. The wrapper invokes it with the
|
||||||
Windows executable path and version, then records `windows_signed: true` in the
|
Windows executable path and version, then records `windows_signed: true` in the
|
||||||
|
|||||||
+7
-3
@@ -13,7 +13,9 @@ usage: scripts/release build --version VERSION [--output DIR] [--sign-windows-ho
|
|||||||
|
|
||||||
Builds a fresh immutable bundle containing:
|
Builds a fresh immutable bundle containing:
|
||||||
rvbox-server-linux-amd64
|
rvbox-server-linux-amd64
|
||||||
|
rvbox-server-linux-arm64
|
||||||
rvc-linux-amd64
|
rvc-linux-amd64
|
||||||
|
rvc-linux-arm64
|
||||||
rvbox-windows-amd64.exe
|
rvbox-windows-amd64.exe
|
||||||
SHA256SUMS
|
SHA256SUMS
|
||||||
manifest.json
|
manifest.json
|
||||||
@@ -92,7 +94,9 @@ docker compose -f "$compose_file" run --rm toolchain sh -ec '
|
|||||||
out=$2
|
out=$2
|
||||||
flags="-s -w -X main.buildVersion=$version"
|
flags="-s -w -X main.buildVersion=$version"
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$flags" -o "$out/rvbox-server-linux-amd64" ./cmd/rvbox-server
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$flags" -o "$out/rvbox-server-linux-amd64" ./cmd/rvbox-server
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "$flags" -o "$out/rvbox-server-linux-arm64" ./cmd/rvbox-server
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$flags" -o "$out/rvc-linux-amd64" ./cmd/rvc
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$flags" -o "$out/rvc-linux-amd64" ./cmd/rvc
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "$flags" -o "$out/rvc-linux-arm64" ./cmd/rvc
|
||||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "-H=windowsgui $flags" -o "$out/rvbox-windows-amd64.exe" ./cmd/rvbox
|
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "-H=windowsgui $flags" -o "$out/rvbox-windows-amd64.exe" ./cmd/rvbox
|
||||||
' sh "$version" "$container_partial"
|
' sh "$version" "$container_partial"
|
||||||
|
|
||||||
@@ -102,10 +106,10 @@ if [ -n "$sign_hook" ]; then
|
|||||||
signed=true
|
signed=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for artifact in rvbox-server-linux-amd64 rvc-linux-amd64 rvbox-windows-amd64.exe; do
|
for artifact in rvbox-server-linux-amd64 rvbox-server-linux-arm64 rvc-linux-amd64 rvc-linux-arm64 rvbox-windows-amd64.exe; do
|
||||||
[ -f "$partial/$artifact" ] && [ ! -L "$partial/$artifact" ] || fail "builder did not create regular $artifact"
|
[ -f "$partial/$artifact" ] && [ ! -L "$partial/$artifact" ] || fail "builder did not create regular $artifact"
|
||||||
done
|
done
|
||||||
(cd "$partial" && sha256sum rvbox-server-linux-amd64 rvc-linux-amd64 rvbox-windows-amd64.exe) >"$partial/SHA256SUMS"
|
(cd "$partial" && sha256sum rvbox-server-linux-amd64 rvbox-server-linux-arm64 rvc-linux-amd64 rvc-linux-arm64 rvbox-windows-amd64.exe) >"$partial/SHA256SUMS"
|
||||||
{
|
{
|
||||||
printf '{\n'
|
printf '{\n'
|
||||||
printf ' "schema": 1,\n'
|
printf ' "schema": 1,\n'
|
||||||
@@ -115,7 +119,7 @@ for artifact in rvbox-server-linux-amd64 rvc-linux-amd64 rvbox-windows-amd64.exe
|
|||||||
printf ' "artifacts": "SHA256SUMS"\n'
|
printf ' "artifacts": "SHA256SUMS"\n'
|
||||||
printf '}\n'
|
printf '}\n'
|
||||||
} >"$partial/manifest.json"
|
} >"$partial/manifest.json"
|
||||||
chmod 0755 "$partial/rvbox-server-linux-amd64" "$partial/rvc-linux-amd64" "$partial/rvbox-windows-amd64.exe"
|
chmod 0755 "$partial/rvbox-server-linux-amd64" "$partial/rvbox-server-linux-arm64" "$partial/rvc-linux-amd64" "$partial/rvc-linux-arm64" "$partial/rvbox-windows-amd64.exe"
|
||||||
chmod 0644 "$partial/SHA256SUMS" "$partial/manifest.json"
|
chmod 0644 "$partial/SHA256SUMS" "$partial/manifest.json"
|
||||||
mv -- "$partial" "$output"
|
mv -- "$partial" "$output"
|
||||||
trap - EXIT HUP INT TERM
|
trap - EXIT HUP INT TERM
|
||||||
|
|||||||
Reference in New Issue
Block a user