Noah Petherbridge
2a8a1df6ab
* Initial codebase (lot of work!) * Uses vanilla Go net/http and implements by hand: session cookies backed by Redis; log in/out; CSRF protection; email verification flow; initial database models (User table)
23 lines
541 B
Makefile
23 lines
541 B
Makefile
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:
|
|
go build $(LDFLAGS) -o gosocial cmd/gosocial/main.go
|
|
|
|
.PHONY: run
|
|
run:
|
|
go run cmd/gosocial/main.go --debug
|