Skip to content

Commit

Permalink
Add hooks for modifying compilation process of nctl
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-casperlabs committed Oct 17, 2023
1 parent 30caa1f commit 877949c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/nctl/sh/assets/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
# NCTL - path to nctl home directory.
########################################

if [ "$NCTL_SKIP_COMPILATION" = "true" ]; then
echo "skipping nctl-compile as requested";
return;
fi

unset OPTIND #clean OPTIND envvar, otherwise getopts can break.
COMPILE_MODE="release" #default compile mode to release.

Expand Down
6 changes: 6 additions & 0 deletions utils/nctl/sh/staging/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ function _main()
#######################################
function set_stage_binaries()
{
# Allow for external overriding of binary staging step if necessary.
if [ -z $NCTL_OVERRIDE_STAGE_BINARIES ]; then
$NCTL_OVERRIDE_STAGE_BINARIES
return
fi;

local PATH_TO_NODE_SOURCE=${1}
local PATH_TO_CLIENT_SOURCE=${2}

Expand Down
7 changes: 7 additions & 0 deletions utils/nctl/sh/staging/set_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ function _main()
curl -O "$_BASE_URL/v$PROTOCOL_VERSION/$REMOTE_FILE" > /dev/null 2>&1
fi
done

# Allow external hook for patching the downloaded binaries.
if [ ! -z "${NCTL_PATCH_REMOTE_CMD}" ]; then
$NCTL_PATCH_REMOTE_CMD ./casper-node
$NCTL_PATCH_REMOTE_CMD ./global-state-update-gen
fi

chmod +x ./casper-node
chmod +x ./global-state-update-gen
if [ "${#PROTOCOL_VERSION}" = '3' ]; then
Expand Down

0 comments on commit 877949c

Please sign in to comment.