Skip to content

Commit

Permalink
use default path to build, remove symlinking (#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur authored Jul 29, 2024
1 parent bdb33fd commit 07d0a9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source "$SUBNET_EVM_PATH"/scripts/constants.sh
if [[ $# -eq 1 ]]; then
BINARY_PATH=$1
elif [[ $# -eq 0 ]]; then
BINARY_PATH="${SUBNET_EVM_PATH}/build/subnet-evm"
BINARY_PATH="$DEFAULT_PLUGIN_DIR/$DEFAULT_VM_ID"
else
echo "Invalid arguments to build subnet-evm. Requires zero (default binary path) or one argument to specify the binary path."
exit 1
Expand All @@ -28,8 +28,3 @@ fi
# Build Subnet EVM, which is run as a subprocess
echo "Building Subnet EVM @ GitCommit: $SUBNET_EVM_COMMIT at $BINARY_PATH"
go build -ldflags "-X github.com/ava-labs/subnet-evm/plugin/evm.GitCommit=$SUBNET_EVM_COMMIT $STATIC_LD_FLAGS" -o "$BINARY_PATH" "plugin/"*.go

PLUGIN_PATH="${DEFAULT_PLUGIN_DIR}/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy"
echo "Symlinking ${BINARY_PATH} to ${PLUGIN_PATH}"
mkdir -p "${DEFAULT_PLUGIN_DIR}"
ln -sf "${BINARY_PATH}" "${PLUGIN_PATH}"
1 change: 1 addition & 0 deletions scripts/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -euo pipefail
# Set the PATHS
GOPATH="$(go env GOPATH)"
DEFAULT_PLUGIN_DIR="${HOME}/.avalanchego/plugins"
DEFAULT_VM_ID="srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy"

# Avalabs docker hub
# avaplatform/avalanchego - defaults to local as to avoid unintentional pushes
Expand Down

0 comments on commit 07d0a9c

Please sign in to comment.