Skip to content

Commit bdb33fd

Browse files
authored
Revert build script change to allow specifying the full binary path (#1252)
1 parent bbf8777 commit bdb33fd

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

scripts/build.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,19 @@ source "$SUBNET_EVM_PATH"/scripts/versions.sh
1717
source "$SUBNET_EVM_PATH"/scripts/constants.sh
1818

1919
if [[ $# -eq 1 ]]; then
20-
PLUGIN_DIR=$1
20+
BINARY_PATH=$1
2121
elif [[ $# -eq 0 ]]; then
22-
PLUGIN_DIR="${DEFAULT_PLUGIN_DIR}"
22+
BINARY_PATH="${SUBNET_EVM_PATH}/build/subnet-evm"
2323
else
24-
echo "Invalid arguments to build subnet-evm. Requires zero (default plugin dir) or one argument to specify the plugin dir."
24+
echo "Invalid arguments to build subnet-evm. Requires zero (default binary path) or one argument to specify the binary path."
2525
exit 1
2626
fi
2727

28-
PLUGIN_PATH="${PLUGIN_DIR}/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy"
29-
30-
BINARY_PATH="build/subnet-evm"
31-
3228
# Build Subnet EVM, which is run as a subprocess
3329
echo "Building Subnet EVM @ GitCommit: $SUBNET_EVM_COMMIT at $BINARY_PATH"
34-
go build -ldflags "-X github.com/ava-labs/subnet-evm/plugin/evm.GitCommit=$SUBNET_EVM_COMMIT $STATIC_LD_FLAGS" -o "./$BINARY_PATH" "plugin/"*.go
30+
go build -ldflags "-X github.com/ava-labs/subnet-evm/plugin/evm.GitCommit=$SUBNET_EVM_COMMIT $STATIC_LD_FLAGS" -o "$BINARY_PATH" "plugin/"*.go
3531

32+
PLUGIN_PATH="${DEFAULT_PLUGIN_DIR}/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy"
3633
echo "Symlinking ${BINARY_PATH} to ${PLUGIN_PATH}"
37-
mkdir -p "${PLUGIN_DIR}"
38-
ln -sf "${PWD}/${BINARY_PATH}" "${PLUGIN_PATH}"
34+
mkdir -p "${DEFAULT_PLUGIN_DIR}"
35+
ln -sf "${BINARY_PATH}" "${PLUGIN_PATH}"

0 commit comments

Comments
 (0)