mirror of
https://github.com/swc-project/swc.git
synced 2024-11-30 15:23:33 +03:00
22 lines
628 B
Bash
Executable File
22 lines
628 B
Bash
Executable File
#!/bin/sh
|
|
|
|
mkdir -p ./artifacts_cli
|
|
# Naive substitution to napi artifacts for the cli binary.
|
|
for filename in artifacts/*/*.node
|
|
do
|
|
BINDING_NAME=${filename#*.}
|
|
BINDING_ABI=${BINDING_NAME%%.*}
|
|
CLI_BINARY_PATH=${filename%%.*}
|
|
|
|
echo "Preparing build artifacts:"
|
|
echo "Binding name $BINDING_NAME"
|
|
echo "Filename $filename"
|
|
echo "Cli binary path $CLI_BINARY_PATH"
|
|
|
|
if [ -f "$CLI_BINARY_PATH" ]; then
|
|
chmod +x $CLI_BINARY_PATH
|
|
mv -v $CLI_BINARY_PATH ./artifacts_cli/swc-$BINDING_ABI
|
|
elif [ -f "$CLI_BINARY_PATH.exe" ]; then
|
|
mv -v $CLI_BINARY_PATH.exe ./artifacts_cli/swc-$BINDING_ABI.exe
|
|
fi
|
|
done |