Skip to content

Commit

Permalink
Merge #1303: Update omnicore-rpc-tests.sh to use OMNIJ_BRANCH env var…
Browse files Browse the repository at this point in the history
…iable to checkout a custom branch/tag

Pull request description:

  The default behavior is to checkout OmniJ `master` branch, but you can set the environment variable `OMNIJ_BRANCH` to either a branch or a tag and that branch/commit will be checked out in the clone repository instead.

  This can be used to use a specific OmniJ version for running the tests.

  For example:
  ```
  export OMNIJ_BRANCH=v0.6.3
  ./omnicore-rpc-tests.sh
  ```
  • Loading branch information
dexX7 committed Jul 7, 2023
2 parents 2c478a7 + fe101b9 commit 5e8b398
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/pull-tester/omnicore-rpc-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ DATADIR="$TESTDIR/.bitcoin"
# Start clean
rm -rf "$BUILDDIR/test/tmp"

git clone https://github.com/OmniLayer/OmniJ.git $TESTDIR
if [ -z "$OMNIJ_BRANCH" ]; then
OMNIJ_BRANCH="master";
fi

git clone --branch $OMNIJ_BRANCH https://github.com/OmniLayer/OmniJ.git $TESTDIR

mkdir -p "$DATADIR/regtest"
touch "$DATADIR/regtest/omnicore.log"
cd $TESTDIR || exit
Expand Down

0 comments on commit 5e8b398

Please sign in to comment.