mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
In #7795, we optimised our CI pipeline to only test the installation of the GUI client whenever we actually upload to the draft release. This trigger has been moved to `workflow_dispatch`, meaning no CI builds neither from PRs nor `main` perform these steps. This makes it difficult to test GUI client binaries from PRs because they also no longer get uploaded to the artifacts of the CI run on the PR. To fix this, we split the testing away from the rename script and unconditionally run the rename script, which allows us to also always upload the binaries to the CI artifacts. Finally, uploading to the draft releases is only done when we explicitly trigger the workflow from `main`. This is a defense-in-depth measure: We should never publish a code to a release that hasn't been merged to `main`.
29 lines
963 B
Bash
Executable File
29 lines
963 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Runs from `rust/gui-client` or `rust/tauri-client`
|
|
|
|
set -euox pipefail
|
|
|
|
# For debugging
|
|
ls "$TARGET_DIR/release" "$TARGET_DIR/release/bundle/deb"
|
|
|
|
# Used for release artifact
|
|
# In release mode the name comes from tauri.conf.json
|
|
# Using a glob for the source, there will only be one exe and one deb anyway
|
|
cp "$TARGET_DIR/release/firezone-client-gui" "$BINARY_DEST_PATH"
|
|
cp "$TARGET_DIR/release/firezone-gui-client.dwp" "$BINARY_DEST_PATH.dwp"
|
|
cp "$TARGET_DIR/release/bundle/deb/firezone-client-gui.deb" "$BINARY_DEST_PATH.deb"
|
|
cp "$TARGET_DIR/../gui-client/firezone-client-gui.rpm" "$BINARY_DEST_PATH.rpm"
|
|
# TODO: Debug symbols for Linux
|
|
|
|
function make_hash() {
|
|
sha256sum "$1" >"$1.sha256sum.txt"
|
|
}
|
|
|
|
# Windows calls it `x64`, Debian `amd64`. Standardize on `x86_64` here since that's
|
|
# what Rust uses.
|
|
make_hash "$BINARY_DEST_PATH"
|
|
make_hash "$BINARY_DEST_PATH.dwp"
|
|
make_hash "$BINARY_DEST_PATH.deb"
|
|
make_hash "$BINARY_DEST_PATH.rpm"
|