Skip to content

Commit

Permalink
test: pin commit to repo clones
Browse files Browse the repository at this point in the history
  • Loading branch information
mayconamaroCW committed Feb 21, 2024
1 parent 78c96de commit d20822a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions e2e-contracts/clone-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,6 +23,13 @@ clone() {
log "Cloning: $repo"
# git clone [email protected]: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"
Expand All @@ -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
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

0 comments on commit d20822a

Please sign in to comment.