From b1986af93a71a7b16cefe60deb3beb8f2664272d Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 16 Jun 2017 15:05:37 +0200 Subject: [PATCH] Added makefile --- jobs/build.sh | 4 ++++ makefile | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 jobs/build.sh create mode 100644 makefile 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