From 4fe6389066a9bb1f9e35e2f3705d6b71e501c051 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Wed, 28 Aug 2024 13:34:57 +0300 Subject: [PATCH] [#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 --- .gitignore | 2 +- Makefile | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ea79306..ab9ea44 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ *.log *.lock tmp/ -bin/hugo +bin/hugo* public/ resources/_gen diff --git a/Makefile b/Makefile index 519f740..39709a7 100644 --- a/Makefile +++ b/Makefile @@ -3,24 +3,25 @@ SHELL = bash PUBDIR = public HUGO_VERSION = 0.91.0 -HUGO_BIN ?= bin/hugo +HUGO_BIN ?= bin/hugo-$(HUGO_VERSION) .PHONY: all clean 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 - |\ tar -xz -C bin/ hugo; + @mv bin/hugo $@ clean: @rm -rf $(PUBDIR) @rm -rf tmp - @rm -rf bin/hugo + @rm -rf bin/hugo* -public: submodules bin/hugo +public: submodules $(HUGO_BIN) @$(HUGO_BIN) -server: submodules bin/hugo +server: submodules $(HUGO_BIN) @$(HUGO_BIN) server --disableFastRender submodules: