Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
chore: .PHONY targets for Make commands (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp authored Nov 17, 2023
1 parent 1cbb5b4 commit c85b3b2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,32 @@ versioningPath := "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/ve
LDFLAGS=-ldflags="-X '$(versioningPath).buildTime=$(shell date)' -X '$(versioningPath).lastCommit=$(shell git rev-parse HEAD)' -X '$(versioningPath).semanticVersion=$(shell git describe --tags --dirty=-dev 2>/dev/null || git rev-parse --abbrev-ref HEAD)'"

all: install
.PHONY: all

install: go.sum
install: mod-verify
@echo "--> Installing blobstream"
@go install -mod=readonly ${LDFLAGS} ./cmd/blobstream
.PHONY: install

go.sum: mod
mod-verify: mod
@echo "--> Verifying dependencies have expected content"
GO111MODULE=on go mod verify
.PHONY: mod-verify

mod:
@echo "--> Updating go.mod"
@go mod tidy
.PHONY: mod

pre-build:
@echo "--> Fetching latest git tags"
@git fetch --tags
.PHONY: pre-build

build: mod
@mkdir -p build/
@go build -o build ${LDFLAGS} ./cmd/blobstream
.PHONY: build

build-docker:
@echo "--> Building Docker image"
Expand All @@ -52,6 +58,7 @@ test:
.PHONY: test

test-all: test-race test-cover
.PHONY: test-all

test-race:
@echo "--> Running tests with -race"
Expand Down

0 comments on commit c85b3b2

Please sign in to comment.