From 2de05edac38d943e94b9159e50d8d1d560febd35 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Wed, 1 Jul 2020 12:22:39 -0400 Subject: changed references of web/* to static/* and cleaned up makefile by removing an unnecessary target --- Makefile | 13 +++---------- cache.go | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 5024d8e..1b244bf 100644 --- a/Makefile +++ b/Makefile @@ -9,24 +9,17 @@ api: main.go go.mod .PHONY: clean clean: - @printf "\n%s\n\n" "Cleaning build and module caches..." + @printf "\n%s\n\n" "Cleaning build artifacts..." go clean - go clean -cache -modcache - @printf "\n%s\n\n" "...Done!" - -.PHONY: update -update: - @printf "\n%s\n\n" "Updating from upstream repository..." - git pull --rebase origin master @printf "\n%s\n\n" "...Done!" .PHONY: install install: @printf "\n%s\n\n%s\n" "Installing ..." "Creating Directories ..." - mkdir -p $(BINDIR)/web + mkdir -p $(BINDIR)/static @printf "\n%s\n" "Copying files..." install -m755 api $(BINDIR) - install -m644 web/* $(BINDIR) + install -m644 static/* $(BINDIR) @printf "\n%s\n" "Setting ownership..." chown -R www:www $(BINDIR) @printf "\n%s\n\n" "...Done!" diff --git a/cache.go b/cache.go index 120e93e..9755877 100644 --- a/cache.go +++ b/cache.go @@ -93,7 +93,7 @@ func (cache *cacheWrapper) bap(requestPath string) error { bytes, err = pkgsQuery(format) default: if requestPath == "/" { - bytes, err = ioutil.ReadFile("web/index.txt") + bytes, err = ioutil.ReadFile("static/index.txt") } else { err = errors.New("Invalid Query Type") } -- cgit 1.4.1-2-gfad0