Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
Add build target to build with version string
  • Loading branch information
FR4NK-W committed Jun 16, 2021
1 parent da8065c commit 73fd39e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.PHONY: all build clean

all: build test

build:
go build -o ./bin/ -ldflags "-X github.com/netsec-ethz/bootstrapper/config.versionString="$(git describe --tags --dirty --always)

clean:
rm -f bin/*

Empty file added bin/.gitkeep
Empty file.
9 changes: 8 additions & 1 deletion config/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "go_default_library",
Expand All @@ -14,3 +14,10 @@ go_library(
"@com_github_pelletier_go_toml//:go_default_library",
],
)

go_test(
name = "go_default_test",
srcs = ["config_test.go"],
embed = [":go_default_library"],
tags = ["unit"],
)

0 comments on commit 73fd39e

Please sign in to comment.