feat: initial implementation

This commit is contained in:
2022-06-09 23:14:33 +01:00
commit 50c92a246d
11 changed files with 426 additions and 0 deletions

24
Makefile Normal file
View File

@@ -0,0 +1,24 @@
NAME = shortmarks
BINARY = bin/${NAME}
VERSION ?= $(shell cat VERSION)
SOURCES = $(shell find . -name '*.go' -o -name 'Makefile')
$(BINARY): $(SOURCES)
CGO_ENABLED=0 go build -a -o ${BINARY} -ldflags "-s -w"
.PHONY: build
build: $(BINARY)
.PHONY: run
run: $(BINARY)
$(BINARY)
.PHONY: clean
clean:
$(eval BIN_DIR := $(shell dirname ${BINARY}))
if [ -f ${BINARY} ]; then rm ${BINARY}; fi
if [ -d ${BIN_DIR} ]; then rmdir ${BIN_DIR}; fi
.PHONY: docker
docker:
docker build -t "$(shell whoami)/$(NAME)" .