Make build target (#1927)

Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
This commit is contained in:
Ioannis Polyzos
2024-08-28 19:29:56 +03:00
committed by GitHub
parent b6cd97f957
commit a00b81d6a9
2 changed files with 7 additions and 0 deletions

View File

@@ -3,6 +3,12 @@ export PATH := $(abspath bin/):${PATH}
# Dependency versions
LICENSEI_VERSION = 0.9.0
# build tofu binary in the current directory with the version set to the git tag
# or commit hash if there is no tag.
.PHONY: build
build:
go build -ldflags "-X main.version=$(shell git describe --tags --always --dirty)" -o tofu ./cmd/tofu
# generate runs `go generate` to build the dynamically generated
# source files, except the protobuf stubs which are built instead with
# "make protobuf".