Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build executables for arm64 platforms as well
- Loading branch information
rodrigozr
committed
Sep 25, 2023
1 parent
eadaf80
commit 5c8e511
Showing
3 changed files
with
31 additions
and
37 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,35 @@ | ||
#!/bin/sh | ||
rm sqs-grep sqs-grep.exe sqs-grep-* > /dev/null 2> /dev/null | ||
echo Bulding executables... | ||
pkg ../ --public -t node18-linux-x64,node18-macos-x64,node18-win-x64 || exit 1 | ||
pkg ../ --public -t node18-linux-x64,node18-linux-arm64,node18-macos-x64,node18-macos-arm64,node18-win-x64,node18-win-arm64 || exit 1 | ||
|
||
# Linux | ||
echo Packaging Linux x64 binary... | ||
mv sqs-grep-linux sqs-grep || exit 1 | ||
tar -cjf sqs-grep-linux-x64.tbz sqs-grep || exit 1 | ||
rm sqs-grep || exit 1 | ||
pack_unix() | ||
{ | ||
FILE=$1 | ||
TARGET=$2 | ||
echo Packaging $FILE binary as $TARGET... | ||
mv $FILE sqs-grep || exit 1 | ||
tar -cjf $TARGET sqs-grep || exit 1 | ||
rm sqs-grep || exit 1 | ||
} | ||
|
||
# MacOS | ||
echo Packaging MacOS x64 binary... | ||
mv sqs-grep-macos sqs-grep || exit 1 | ||
tar -cjf sqs-grep-macos-x64.tbz sqs-grep || exit 1 | ||
rm sqs-grep || exit 1 | ||
pack_win() | ||
{ | ||
FILE=$1 | ||
TARGET=$2 | ||
echo Packaging $FILE binary as $TARGET... | ||
mv $FILE sqs-grep.exe || exit 1 | ||
zip -9 $TARGET sqs-grep.exe || exit 1 | ||
rm sqs-grep.exe || exit 1 | ||
} | ||
|
||
|
||
# Linux and MacOS | ||
pack_unix sqs-grep-linux-x64 sqs-grep-linux-x64.tbz | ||
pack_unix sqs-grep-linux-arm64 sqs-grep-linux-arm64.tbz | ||
pack_unix sqs-grep-macos-x64 sqs-grep-macos-x64.tbz | ||
pack_unix sqs-grep-macos-arm64 sqs-grep-macos-arm64.tbz | ||
|
||
# Windows | ||
echo Packaging Windows x64 binary... | ||
mv sqs-grep-win.exe sqs-grep.exe || exit 1 | ||
zip -9 sqs-grep-win-x64.zip sqs-grep.exe || exit 1 | ||
rm sqs-grep.exe || exit 1 | ||
pack_win sqs-grep-win-x64.exe sqs-grep-win-x64.zip | ||
pack_win sqs-grep-win-arm64.exe sqs-grep-win-arm64.zip |