From d20822ab3b90d12b61a56e160892bfb0b3c261ab Mon Sep 17 00:00:00 2001 From: Maycon Amaro Date: Wed, 21 Feb 2024 11:14:32 -0300 Subject: [PATCH] test: pin commit to repo clones --- e2e-contracts/clone-contracts.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/e2e-contracts/clone-contracts.sh b/e2e-contracts/clone-contracts.sh index f86b1722e..0f99cb51c 100755 --- a/e2e-contracts/clone-contracts.sh +++ b/e2e-contracts/clone-contracts.sh @@ -11,6 +11,7 @@ source $(dirname $0)/_functions.sh # Clone a project to the projects directory. clone() { repo=$1 + commit=$2 target=repos/$repo mkdir -p repos @@ -22,6 +23,13 @@ clone() { log "Cloning: $repo" # git clone git@github.com:cloudwalk/$repo.git $target git clone https://github.com/cloudwalk/$repo.git $target + + # checkout commit if specified and it's different from HEAD + head_commit=$(git -C $target rev-parse --short HEAD) + if [ -n "$commit" ] && [ "$commit" != "$head_commit" ]; then + log "Checking out commit: $commit" + git -C $target checkout $commit --quiet + fi fi log "Installing dependencies: $repo" @@ -33,9 +41,9 @@ clone() { # ------------------------------------------------------------------------------ log "Cloning or updating repositories" -clone brlc-multisig -clone brlc-periphery -clone brlc-token -clone compound-periphery -clone brlc-yield-streamer -clone brlc-pix-cashier \ No newline at end of file +clone brlc-multisig 918a226 +clone brlc-periphery b8d507a +clone brlc-token 55770b9 +clone compound-periphery e4d68df +clone brlc-yield-streamer e63d8ba +clone brlc-pix-cashier 00cc007 \ No newline at end of file