From 6867ac07b4112c10a93babe84399b903afa3167d Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 8 Nov 2018 12:45:59 -0500 Subject: [PATCH] Update Makefile with new commands, fixes - Fixes make clean - Changes make to make ui - Generates keys on make install - Adds make run, make build --- Makefile | 26 +++++++++++++++++++++----- README.md | 13 +++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 89bcd59..c95392f 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,30 @@ +GOCMD=go +GOINSTALL=$(GOCMD) install +GOBUILD=$(GOCMD) build +GOTEST=$(GOCMD) test +BINARY_NAME=writefreely -all : local +all : build + +build: + cd cmd/writefreely; $(GOBUILD) + +test: + $(GOTEST) -v ./... + +run: + $(GOINSTALL) ./... + $(BINARY_NAME) --debug install : + ./keys.sh cd less/; $(MAKE) install $(MFLAGS) -clean : - cd less/; $(MAKE) install $(MFLAGS) - -local : force_look +ui : force_look cd less/; $(MAKE) $(MFLAGS) + +clean : + cd less/; $(MAKE) clean $(MFLAGS) force_look : true diff --git a/README.md b/README.md index 6e9b39e..b9df60a 100644 --- a/README.md +++ b/README.md @@ -76,16 +76,9 @@ Create your database, import the schema, and configure your site [as shown above Now generate the CSS: ```bash -make install -make # Run this whenever you update your styles -``` - -Lastly, run the application (you could put this into a quick shell script called `run.sh`) - -```bash -#!/bin/bash - -go install ./... && writefreely --debug +make install # Generates encryption keys; installs LESS compiler +make ui # Generates CSS (run this whenever you update your styles) +make run # Runs the application ``` ## License