-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new package-windows script
- Loading branch information
1 parent
043b4d3
commit 7f27851
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |