Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avalanche: fix start time in genesis file #196

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions chains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,14 @@
github-organization: ava-labs
github-repo: avalanchego
dockerfile: avalanche
build-target:
bash scripts/build.sh
pre-build: |
startTime="$(sed -n 's|.*"startTime":\([^"]*\),.*|\1|p' genesis/genesis_local.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
build-target: bash scripts/build.sh
binaries:
- build/avalanchego

Expand Down Expand Up @@ -314,7 +320,7 @@
COMMIT=$(git log -1 --format='%H')
LDFLAGS="$LDFLAGS -X github.com/cosmos/cosmos-sdk/version.Name=celestia-app -X github.com/cosmos/cosmos-sdk/version.AppName=celestia-appd -X github.com/cosmos/cosmos-sdk/version.Version=$VERSION -X github.com/cosmos/cosmos-sdk/version.Commit=$COMMIT"
go install -ldflags="$LDFLAGS" ./cmd/celestia-appd
binaries:
binaries:
- /go/bin/celestia-appd

# Celestia Node
Expand All @@ -326,7 +332,7 @@
versioningPath="github.com/celestiaorg/celestia-node/nodebuilder/node"
LDFLAGS="$LDFLAGS -X '${versioningPath}.buildTime=$(date)' -X '${versioningPath}.lastCommit=$(git rev-parse HEAD)' -X '${versioningPath}.semanticVersion=$(git describe --tags --dirty=-dev 2>/dev/null || git rev-parse --abbrev-ref HEAD)'"
go install -ldflags="$LDFLAGS" ./cmd/celestia
binaries:
binaries:
- /go/bin/celestia

# Cerberus
Expand Down Expand Up @@ -1193,7 +1199,7 @@
build-target: |
BUILD_TAGS=netgo,muslc
LD_FLAGS="-s -w -X github.com/cosmos/cosmos-sdk/version.Name=wormchain -X github.com/cosmos/cosmos-sdk/version.Version=$(echo $(git describe --tags) | sed 's/^v//') -X github.com/cosmos/cosmos-sdk/version.Commit=$(git log -1 --format='%H') -X github.com/cosmos/cosmos-sdk/version.BuildTags=\"${BUILD_TAGS}\" -X github.com/cosmos/cosmos-sdk/version.ServerName=wormchaind"
go build -mod=readonly -tags="${BUILD_TAGS}" -ldflags="$LDFLAGS ${LD_FLAGS}" -o build/wormchaind cmd/wormchaind/main.go
go build -mod=readonly -tags="${BUILD_TAGS}" -ldflags="$LDFLAGS ${LD_FLAGS}" -o build/wormchaind cmd/wormchaind/main.go
build-dir: wormchain
binaries:
- wormchain/build/wormchaind
Expand Down
Loading