From 03eb1eff1448623c8a17c232de8b539895486653 Mon Sep 17 00:00:00 2001 From: n0cte Date: Fri, 27 Oct 2023 15:05:12 +0400 Subject: [PATCH] fix startTime modification --- chains.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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