Update Makefile with new commands, fixes
- Fixes make clean - Changes make to make ui - Generates keys on make install - Adds make run, make build
This commit is contained in:
parent
2e52b8cf55
commit
6867ac07b4
2 changed files with 24 additions and 15 deletions
26
Makefile
26
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 :
|
install :
|
||||||
|
./keys.sh
|
||||||
cd less/; $(MAKE) install $(MFLAGS)
|
cd less/; $(MAKE) install $(MFLAGS)
|
||||||
|
|
||||||
clean :
|
ui : force_look
|
||||||
cd less/; $(MAKE) install $(MFLAGS)
|
|
||||||
|
|
||||||
local : force_look
|
|
||||||
cd less/; $(MAKE) $(MFLAGS)
|
cd less/; $(MAKE) $(MFLAGS)
|
||||||
|
|
||||||
|
clean :
|
||||||
|
cd less/; $(MAKE) clean $(MFLAGS)
|
||||||
|
|
||||||
force_look :
|
force_look :
|
||||||
true
|
true
|
||||||
|
|
13
README.md
13
README.md
|
@ -76,16 +76,9 @@ Create your database, import the schema, and configure your site [as shown above
|
||||||
Now generate the CSS:
|
Now generate the CSS:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make install
|
make install # Generates encryption keys; installs LESS compiler
|
||||||
make # Run this whenever you update your styles
|
make ui # Generates CSS (run this whenever you update your styles)
|
||||||
```
|
make run # Runs the application
|
||||||
|
|
||||||
Lastly, run the application (you could put this into a quick shell script called `run.sh`)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
go install ./... && writefreely --debug
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
Loading…
Add table
Reference in a new issue