Skip to content

Commit 93ec918

Browse files
committed
build(project): introduce goal to build docker image
1 parent 001345d commit 93ec918

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ format-proto: ## Format proto files
173173

174174
## Build:
175175
.PHONY: build
176-
build: build-go ## Build all available artefacts (executable, docker image, etc.)
176+
build: build-go build-docker ## Build all available artefacts (executable, docker image, etc.)
177177

178178
.PHONY: build-go
179179
build-go: ## Build node executable for the current environment (default build)
@@ -182,6 +182,11 @@ build-go: ## Build node executable for the current environment (default build)
182182

183183
build-go-all: $(ENVIRONMENTS_TARGETS) ## Build node executables for all available environments
184184

185+
.PHONY: build-docker
186+
build-docker: $(TOOL_HEIGHLINER_BIN) ## Build docker image
187+
@echo "${COLOR_CYAN} 🐳 Building local ${COLOR_RESET}docker${COLOR_CYAN} image${COLOR_RESET}"
188+
@$(TOOL_HEIGHLINER_BIN) build -c axone --local
189+
185190
$(ENVIRONMENTS_TARGETS):
186191
@GOOS=$(word 3, $(subst -, ,$@)); \
187192
GOARCH=$(word 4, $(subst -, ,$@)); \
@@ -218,7 +223,7 @@ test-go: $(TOOL_TPARSE_BIN) build ## Pass the test for the go source code
218223
@go test -v -coverprofile ./target/coverage.txt ./... -json | $(TOOL_TPARSE_BIN)
219224

220225
## Chain:
221-
chain-init: build ## Initialize the blockchain with default settings.
226+
chain-init: build-go ## Initialize the blockchain with default settings.
222227
@echo "${COLOR_CYAN} 🛠️ Initializing chain ${COLOR_RESET}${CHAIN}${COLOR_CYAN} under ${COLOR_YELLOW}${CHAIN_HOME}${COLOR_RESET}"
223228

224229
@rm -rf "${CHAIN_HOME}"; \
@@ -250,7 +255,7 @@ chain-init: build ## Initialize the blockchain with default settings.
250255
${CHAIN_BINARY} genesis collect-gentxs \
251256
--home "${CHAIN_HOME}"
252257

253-
chain-start: build ## Start the blockchain with existing configuration (see chain-init)
258+
chain-start: build-go ## Start the blockchain with existing configuration (see chain-init)
254259
@echo "${COLOR_CYAN} 🛠️ Starting chain ${COLOR_RESET}${CHAIN}${COLOR_CYAN} with configuration ${COLOR_YELLOW}${CHAIN_HOME}${COLOR_RESET}"; \
255260
${CHAIN_BINARY} start --moniker ${CHAIN_MONIKER} \
256261
--home ${CHAIN_HOME}
@@ -259,14 +264,14 @@ chain-stop: ## Stop the blockchain
259264
@echo "${COLOR_CYAN} ✋️ Stopping chain ${COLOR_RESET}${CHAIN}${COLOR_CYAN} with configuration ${COLOR_YELLOW}${CHAIN_HOME}${COLOR_RESET}"
260265
@killall axoned
261266

262-
chain-upgrade: build ## Test the chain upgrade from the given FROM_VERSION to the given TO_VERSION.
267+
chain-upgrade: build-go ## Test the chain upgrade from the given FROM_VERSION to the given TO_VERSION.
263268
@echo "${COLOR_CYAN} ⬆️ Upgrade the chain ${COLOR_RESET}${CHAIN}${COLOR_CYAN} from ${COLOR_YELLOW}${FROM_VERSION}${COLOR_RESET}${COLOR_CYAN} to ${COLOR_YELLOW}${TO_VERSION}${COLOR_RESET}"
264269
@killall cosmovisor || \
265270
rm -rf ${TARGET_FOLDER}/${FROM_VERSION}; \
266271
git clone -b ${FROM_VERSION} https://github.com/axone-protocol/axoned.git ${TARGET_FOLDER}/${FROM_VERSION}; \
267272
echo "${COLOR_CYAN} 🏗 Build the ${COLOR_YELLOW}${FROM_VERSION}${COLOR_RESET}${COLOR_CYAN} binary...${COLOR_RESET}"; \
268273
cd ${TARGET_FOLDER}/${FROM_VERSION}; \
269-
make build; \
274+
make build-go; \
270275
BINARY_OLD=${TARGET_FOLDER}/${FROM_VERSION}/${DIST_FOLDER}/${DAEMON_NAME}; \
271276
cd ../../; \
272277
echo $$BINARY_OLD; \

0 commit comments

Comments
 (0)