Skip to content

Commit

Permalink
fix: overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylar Simoncelli committed Sep 25, 2024
1 parent 5bc9dc6 commit 5cadf9f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions dev/local-environment/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@ configure_artifact_overrides() {

if [ "$overrides" == "yes" ]; then
echo -e "Artifact overrides enabled. \n"
artifact_override=yes
else
read -p "Do you want to override artifacts from local paths? (Y/N): " override_artifact
if [[ $override_artifact == [Yy]* ]]; then
artifact_override=yes
overrides=yes
echo -e "Artifact overrides enabled. \n"
echo "To override pc-contracts-cli artifact, copy artifacts to path:"
echo -e "./configurations/pc-contracts-cli/overrides/pc-contracts-cli and ./configurations/pc-contracts-cli/overrides/node_modules \n"
Expand All @@ -169,22 +168,19 @@ configure_artifact_overrides() {
echo "To override the partner-chains-cli artifact, copy artifact to path:"
echo -e "./configurations/pc-contracts-cli/overrides/partner-chains-cli \n"
else
artifact_override=no
echo -e "Artifact overrides disabled. Stable versions will be automatically downloaded within the container from Github Releases. \n"
fi
fi
else
# Non-interactive mode
if [ "$overrides" == "yes" ]; then
echo -e "Artifact overrides enabled. \n"
artifact_override=yes
else
artifact_override=no
fi
fi

# Check for the existence of the artifact paths
if [ "$artifact_override" == "yes" ]; then
if [ "$overrides" == "yes" ]; then
# Check for pc-contracts-cli artifact
if [[ -f "./configurations/pc-contracts-cli/overrides/pc-contracts-cli" && -d "./configurations/pc-contracts-cli/overrides/node_modules" ]]; then
echo -e "pc-contracts-cli and node_modules found. Override enabled. \n"
Expand Down Expand Up @@ -341,7 +337,7 @@ CPU_OGMIOS=0.000
MEM_OGMIOS=1000G
CPU_KUPO=0.000
MEM_KUPO=1000G
ARTIFACT_OVERRIDE=$artifact_override
ARTIFACT_OVERRIDE=$overrides
EOF
else
cat <<EOF >.env
Expand All @@ -361,7 +357,7 @@ CPU_OGMIOS=$cpu_ogmios
MEM_OGMIOS=$mem_ogmios
CPU_KUPO=$cpu_kupo
MEM_KUPO=$mem_kupo
ARTIFACT_OVERRIDE=$artifact_override
ARTIFACT_OVERRIDE=$overrides
EOF
fi

Expand Down

0 comments on commit 5cadf9f

Please sign in to comment.