Skip to content

Commit 1a93b17

Browse files
committed
feat: Pin hugo version in Makefile
1 parent 9c77db5 commit 1a93b17

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
SHELL := /bin/bash
22

3+
HUGO_VERSION := 0.139.4
4+
35
dev:
46
hugo server -D --noHTTPCache --disableFastRender --ignoreCache
57

68
update:
7-
-rm ~/go/bin/hugo 2>/dev/null
89
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
10+
$(eval VERSION := $(shell hugo version | grep -oP '\d+\.\d+\.\d+'))
11+
@echo New version: $(VERSION) Old Version: $(HUGO_VERSION)
12+
@sed -i 's/\(^HUGO_VERSION := \).*/\1 $(VERSION)/' Makefile
13+
914

15+
install:
16+
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v$(HUGO_VERSION)

0 commit comments

Comments
 (0)