Skip to content

Commit

Permalink
DEV: Add Makefile containing shorthand commands to run test suite, bu…
Browse files Browse the repository at this point in the history
…ild nad run project.
  • Loading branch information
Cian911 committed Dec 12, 2021
1 parent da240aa commit 5980f2a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.PHONY: build run
.PHONY: test-all test-watcher test-event test-utils

VERSION := test-build
BUILD := $$(git log -1 --pretty=%h)
BUILD_TIME := $$(date -u +"%Y%m%d.%H%M%S")

build:
@go build \
-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD} -X main.BuildTime=${BUILD_TIME}" \
-o ./bin/switchboard ./cmd

run:
@go run ./cmd/main.go

test-watcher:
@gotest -v ./watcher

test-event:
@gotest -v ./event

test-utils:
@gotest -v ./utils

test-all: test-watcher test-event test-utils

0 comments on commit 5980f2a

Please sign in to comment.