aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-07-01 12:22:39 -0400
committerBen Morrison <ben@gbmor.dev>2020-07-01 12:22:39 -0400
commit2de05edac38d943e94b9159e50d8d1d560febd35 (patch)
tree244a6d807a10dea328e63759b026882190799c82
parentb2b262faa56be956cb515e54db2fa5d016c88c36 (diff)
downloadapi-master.tar.gz
changed references of web/* to static/* and cleaned up makefileHEADmaster
by removing an unnecessary target
-rw-r--r--Makefile13
-rw-r--r--cache.go2
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")
}