website/Makefile

23 lines
539 B
Makefile
Raw Normal View History

SHELL := /bin/bash
VERSION=$(shell egrep -e 'Version\s+=' pkg/branding/branding.go | head -n 1 | cut -d '"' -f 2)
BUILD=$(shell git describe --always)
BUILD_DATE=$(shell date +"%Y-%m-%dT%H:%M:%S%z")
CURDIR=$(shell curdir)
# Inject the build version (commit hash) into the executable.
LDFLAGS := -ldflags "-X main.Build=$(BUILD) -X main.BuildDate=$(BUILD_DATE)"
all: build
.PHONY: setup
setup:
go get ./...
.PHONY: build
build:
2022-08-26 04:21:46 +00:00
go build $(LDFLAGS) -o nonshy cmd/nonshy/main.go
.PHONY: run
run:
2022-08-26 04:21:46 +00:00
go run cmd/nonshy/main.go web --debug