2022-12-23 10:53:51 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
SHELL = bash
|
|
|
|
|
|
|
|
PUBDIR = public
|
|
|
|
HUGO_VERSION = 0.91.0
|
2024-08-28 10:34:57 +00:00
|
|
|
HUGO_BIN ?= bin/hugo-$(HUGO_VERSION)
|
2022-12-23 10:53:51 +00:00
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
all: public
|
|
|
|
|
2024-08-28 10:34:57 +00:00
|
|
|
bin/hugo-$(HUGO_VERSION):
|
2022-12-23 10:53:51 +00:00
|
|
|
@wget -q https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz -O - |\
|
|
|
|
tar -xz -C bin/ hugo;
|
2024-08-28 10:34:57 +00:00
|
|
|
@mv bin/hugo $@
|
2022-12-23 10:53:51 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm -rf $(PUBDIR)
|
|
|
|
@rm -rf tmp
|
2024-08-28 10:34:57 +00:00
|
|
|
@rm -rf bin/hugo*
|
2022-12-23 10:53:51 +00:00
|
|
|
|
2024-08-28 10:34:57 +00:00
|
|
|
public: submodules $(HUGO_BIN)
|
2022-12-23 10:53:51 +00:00
|
|
|
@$(HUGO_BIN)
|
|
|
|
|
2024-08-28 10:34:57 +00:00
|
|
|
server: submodules $(HUGO_BIN)
|
2022-12-23 10:53:51 +00:00
|
|
|
@$(HUGO_BIN) server --disableFastRender
|
|
|
|
|
|
|
|
submodules:
|
|
|
|
@git submodule init
|
|
|
|
@git submodule update --recursive --remote
|
2024-08-29 09:59:14 +00:00
|
|
|
|
|
|
|
.PHONY: deploy
|
|
|
|
deploy:
|
|
|
|
test -f public/index.html
|
|
|
|
cd public && tar --gzip --create . | ssh deploy@frostfs.info frostfs.info
|