simplify handling of eth2-clients/eth2-testnets repo [skip ci]
This commit is contained in:
parent
568e669b1c
commit
0794337ba6
|
@ -27,18 +27,9 @@ cli do (testnetName {.argument.}: string):
|
|||
buildDir = rootDir / "build"
|
||||
allTestnetsDir = buildDir / testnetsRepo
|
||||
|
||||
if not dirExists(allTestnetsDir):
|
||||
cd buildDir
|
||||
exec &"git clone {testnetsRepoGitUrl}"
|
||||
|
||||
cd allTestnetsDir
|
||||
# Drop all local modifications to make sure the next
|
||||
# commands won't fail:
|
||||
exec "git reset --hard HEAD"
|
||||
# Go in detached state, so we don't try to
|
||||
exec "git checkout --detach"
|
||||
exec &"git fetch -f {testnetsRepoGitUrl} master:master"
|
||||
exec "git checkout master"
|
||||
rmDir(allTestnetsDir)
|
||||
cd buildDir
|
||||
exec &"git clone --quiet {testnetsRepoGitUrl}"
|
||||
|
||||
let testnetDir = allTestnetsDir / team / testnet
|
||||
if not dirExists(testnetDir):
|
||||
|
|
|
@ -33,17 +33,9 @@ while true; do
|
|||
esac
|
||||
done
|
||||
|
||||
if [[ ! -d "$ETH2_TESTNETS" ]]; then
|
||||
git clone git@github.com:eth2-clients/eth2-testnets "$ETH2_TESTNETS"
|
||||
fi
|
||||
|
||||
pushd "$ETH2_TESTNETS"
|
||||
# Make sure we've checked out the very latest master
|
||||
git reset --hard HEAD
|
||||
git checkout --detach
|
||||
git fetch -f origin master:master
|
||||
git checkout master
|
||||
popd
|
||||
rm -rf "$ETH2_TESTNETS"
|
||||
# "--depth 1" does not make it faster, for such a small repo
|
||||
git clone --quiet git@github.com:eth2-clients/eth2-testnets "$ETH2_TESTNETS"
|
||||
|
||||
ETH2_TESTNETS_ABS=$(cd "$ETH2_TESTNETS"; pwd)
|
||||
NETWORK_DIR_ABS="$ETH2_TESTNETS_ABS/nimbus/$NETWORK_NAME"
|
||||
|
|
Loading…
Reference in New Issue