Skip to content
Merged
Changes from all commits
Commits
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
chore: sign the windows installer
We have been signing all Windows executablees, but not the installer.
  • Loading branch information
kylecarbs committed Aug 19, 2024
commit 43c2dc0a8672a5da9234cdaa1b91aa3843fc5370
10 changes: 10 additions & 0 deletions scripts/build_windows_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
agpl="${CODER_BUILD_AGPL:-0}"
output_path=""
version=""
sign_windows="${CODER_SIGN_WINDOWS:-0}"

args="$(getopt -o "" -l agpl,output:,version: -- "$@")"
eval set -- "$args"
Expand Down Expand Up @@ -51,6 +52,11 @@ if [[ "$output_path" == "" ]]; then
error "--output is a required parameter"
fi

if [[ "$sign_windows" == 1 ]]; then
dependencies java
requiredenvs JSIGN_PATH EV_KEYSTORE EV_KEY EV_CERTIFICATE_PATH EV_TSA_URL GCLOUD_ACCESS_TOKEN
fi

if [[ "$#" != 1 ]]; then
error "Exactly one argument must be provided to this script, $# were supplied"
fi
Expand Down Expand Up @@ -125,3 +131,7 @@ popd
cp "$temp_dir/installer.exe" "$output_path"

rm -rf "$temp_dir"

if [[ "$sign_windows" == 1 ]]; then
execrelative ./sign_windows.sh "$output_path" 1>&2
fi
Loading