Skip to content

Commit

Permalink
build: skip run_use for proposals without use.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Nov 8, 2023
1 parent d68de01 commit c3997cb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
8 changes: 0 additions & 8 deletions proposals/49:smart-wallet-nft/use.sh

This file was deleted.

8 changes: 0 additions & 8 deletions proposals/55:statom-vaults/use.sh

This file was deleted.

22 changes: 19 additions & 3 deletions upgrade-test-scripts/run_use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,32 @@

set -e

ID=$1
if [ -z "$ID" ]; then
echo "Must specify what proposal to use"
exit 1
fi
PROPOSAL_PATH="/usr/src/proposals/$ID/"

if [ ! -d "$PROPOSAL_PATH" ]; then
echo "Proposal $ID does not exist"
exit 1
fi

if [ ! -f "$PROPOSAL_PATH/use.sh" ]; then
echo "Proposal $ID does not have a use.sh. Skipping."
exit 0
fi

source ./env_setup.sh

export SLOGFILE=slog.slog

PROPOSAL_PATH=$1

echo "Starting agd in the background."
startAgd

echo "Agd started. Running use.sh."
cd /usr/src/proposals/"$PROPOSAL_PATH/" || exit
cd "$PROPOSAL_PATH"
./use.sh

echo "Actions completed. Running for a few blocks and exiting."
Expand Down

0 comments on commit c3997cb

Please sign in to comment.