diff --git a/jobs/build.sh b/jobs/build.sh new file mode 100755 index 00000000..0f817f6e --- /dev/null +++ b/jobs/build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +MYDIR="$(dirname "$(realpath "$0")")" +cd "$MYDIR" +for dir in ./*; do ([ -d "$dir" ] && cd "$dir" && echo "Building $dir" && go build); done \ No newline at end of file diff --git a/makefile b/makefile new file mode 100644 index 00000000..e187fbec --- /dev/null +++ b/makefile @@ -0,0 +1,23 @@ +# Makefile for Anime Notifier + +GOCMD=@go +GOBUILD=$(GOCMD) build +GOINSTALL=$(GOCMD) install +GOTEST=$(GOCMD) test +BUILDJOBS=@./jobs/build.sh + +server: + $(GOBUILD) +jobs: + $(BUILDJOBS) +install: + $(GOINSTALL) +test: + $(GOTEST) +bench: + $(GOTEST) -bench . +depslist: + $(GOCMD) list -f {{.Deps}} | sed -e 's/\[//g' -e 's/\]//g' | tr " " "\n" +all: server jobs + +.PHONY: jobs \ No newline at end of file