forked from submariner-io/submariner-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (21 loc) · 765 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
PORT ?= 1313
BIND ?= localhost
OPEN_CMD := $(shell command -v open || command -v xdg-open || echo : 2>/dev/null)
HUGO_VERSION := v0.71.0
OUTPUT_DIR:=/
hugo:
@echo Downloading hugo wrapper
@curl -L -o hugo https://github.com/khos2ow/hugo-wrapper/releases/download/v1.4.0/hugow
@@chmod +x hugo
@./hugo --get-version $(HUGO_VERSION)
server: hugo
(sleep 2; $(OPEN_CMD) http://localhost:$(PORT)) &
./hugo server -w -s src --bind=$(BIND) --port=$(PORT)
static: hugo
./hugo -D -s src -b $(OUTPUT_DIR) -d ../output/$(OUTPUT_DIR)
static-all: hugo
./scripts/make-all-versions # we use a script because we expect that changes could happen on makefiles
CODEOWNERS: CODEOWNERS.in
$(CURDIR)/scripts/gen-codeowners
.DEFAULT_GOAL := static
.PHONY: static server