diff --git a/chains.yaml b/chains.yaml index cbf8bd6..d67b450 100644 --- a/chains.yaml +++ b/chains.yaml @@ -155,13 +155,14 @@ github-organization: ava-labs github-repo: avalanchego dockerfile: avalanche - build-target: | + pre-build: | startTime="$(sed -n 's|.*"startTime":\([^"]*\),.*|\1|p' genesis/genesis_local.json)" - if [ "$(date +%s)" -gt $startTime ]; then - sed "s/$startTime/1690862400/g" genesis/genesis_local.json > genesis/genesis_local_tmp.json + nowTime="$(date +%s)" + if [ $nowTime -gt $startTime ]; then + sed "s/$startTime/$nowTime/g" genesis/genesis_local.json > genesis/genesis_local_tmp.json mv genesis/genesis_local_tmp.json genesis/genesis_local.json fi - bash scripts/build.sh + build-target: bash scripts/build.sh binaries: - build/avalanchego