Skip to content

Commit

Permalink
chore: only add upgrade if build with e2e tag
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jul 29, 2024
1 parent 6165490 commit 61cfcaa
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ dockerNetworkList=$($(DOCKER) network ls --filter name=bbn-testnet --format {{.I
build-docker: ## Build babylond Docker image
$(MAKE) -C contrib/images babylond

build-docker-e2e: build-docker
build-docker-e2e:
$(MAKE) -C contrib/images babylond-e2e
$(MAKE) -C contrib/images babylond-before-upgrade
$(MAKE) -C contrib/images e2e-init-chain

Expand Down
7 changes: 2 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ import (
"github.com/spf13/cast"

"github.com/babylonlabs-io/babylon/app/upgrades"
"github.com/babylonlabs-io/babylon/app/upgrades/vanilla"
bbn "github.com/babylonlabs-io/babylon/types"

appkeepers "github.com/babylonlabs-io/babylon/app/keepers"
Expand Down Expand Up @@ -159,10 +158,8 @@ var (
}

// software upgrades and forks
Upgrades = []upgrades.Upgrade{
vanilla.Upgrade,
}
Forks = []upgrades.Fork{}
Upgrades = []upgrades.Upgrade{}
Forks = []upgrades.Fork{}
)

func init() {
Expand Down
9 changes: 9 additions & 0 deletions app/e2e_include_upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build e2e

package app

import "github.com/babylonlabs-io/babylon/app/upgrades/vanilla"

func init() {
Upgrades = append(Upgrades, vanilla.Upgrade)
}
4 changes: 4 additions & 0 deletions contrib/images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ all: babylond cosmos-relayer
babylond: babylond-rmi
docker build --tag babylonlabs-io/babylond -f babylond/Dockerfile ${BABYLON_FULL_PATH}

babylond-e2e: babylond-rmi
docker build --tag babylonlabs-io/babylond -f babylond/Dockerfile ${BABYLON_FULL_PATH} \
--build-arg BUILD_TAGS="e2e"

babylond-before-upgrade:
docker rmi babylonlabs-io/babylond-before-upgrade 2>/dev/null; true && \
docker build --tag babylonlabs-io/babylond-before-upgrade -f babylond/Dockerfile \
Expand Down
1 change: 1 addition & 0 deletions contrib/images/babylond/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM golang:1.21 AS build-env
# Version to build. Default is empty
ARG VERSION

ARG BUILD_TAGS=""
ARG LEDGER_ENABLED="false"
# Cosmos build options
ARG COSMOS_BUILD_OPTIONS=""
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ require (
github.com/vulpine-io/io-test v1.0.0
go.uber.org/zap v1.26.0
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0
golang.org/x/sync v0.7.0
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de
)

Expand Down Expand Up @@ -247,7 +248,6 @@ require (
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/api v0.162.0 // indirect
Expand Down

0 comments on commit 61cfcaa

Please sign in to comment.