[#25] Store hugo binary in versioned path

This will simplify runner cache invalidation
when we will start building the site with CI

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
Vitaliy Potyarkin 2024-08-28 13:34:57 +03:00
parent 6f46df233a
commit 4fe6389066
2 changed files with 7 additions and 6 deletions

2
.gitignore vendored
View file

@ -3,7 +3,7 @@
*.log *.log
*.lock *.lock
tmp/ tmp/
bin/hugo bin/hugo*
public/ public/
resources/_gen resources/_gen

View file

@ -3,24 +3,25 @@ SHELL = bash
PUBDIR = public PUBDIR = public
HUGO_VERSION = 0.91.0 HUGO_VERSION = 0.91.0
HUGO_BIN ?= bin/hugo HUGO_BIN ?= bin/hugo-$(HUGO_VERSION)
.PHONY: all clean .PHONY: all clean
all: public all: public
bin/hugo: bin/hugo-$(HUGO_VERSION):
@wget -q https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz -O - |\ @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; tar -xz -C bin/ hugo;
@mv bin/hugo $@
clean: clean:
@rm -rf $(PUBDIR) @rm -rf $(PUBDIR)
@rm -rf tmp @rm -rf tmp
@rm -rf bin/hugo @rm -rf bin/hugo*
public: submodules bin/hugo public: submodules $(HUGO_BIN)
@$(HUGO_BIN) @$(HUGO_BIN)
server: submodules bin/hugo server: submodules $(HUGO_BIN)
@$(HUGO_BIN) server --disableFastRender @$(HUGO_BIN) server --disableFastRender
submodules: submodules: