Skip to content

Commit

Permalink
feat: add new package-windows script
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierChanth committed Dec 5, 2023
1 parent 043b4d3 commit 7f27851
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tools/package-windows-x64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# This script is used to package the macOS x64 binaries for sshnoports.
# It first unpacks the prebuilt binaries, then it calls the notarize-macos.sh
# script to notarize the binaries

FULL_PATH_TO_SCRIPT="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIRECTORY="$(dirname "$FULL_PATH_TO_SCRIPT")"
ROOT_DIRECTORY="$SCRIPT_DIRECTORY/.."

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <tgz file>"
exit 1
fi

if [ "$(uname)" != "Darwin" ]; then
echo "This script is only for macOS";
exit 1;
fi

TAR_FILE="$1"

OUTPUT_DIR_PATH="$ROOT_DIRECTORY/build/windows-x64"
OUTPUT_DIR="$OUTPUT_DIR_PATH/sshnp"

rm -r "$OUTPUT_DIR_PATH"
mkdir -p "$OUTPUT_DIR"
tar -xvf "$TAR_FILE" -C "$OUTPUT_DIR_PATH"

# Zip the signed binaries
ditto -c -k --keepParent "$OUTPUT_DIR_PATH"/sshnp "$OUTPUT_DIR_PATH/sshnp-windows-x64".zip

0 comments on commit 7f27851

Please sign in to comment.