Skip to content

Commit 2142578

Browse files
feat: install latest hugo according to platform
Signed-off-by: Harshita-Kanal <[email protected]>
1 parent 9bee911 commit 2142578

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ content/docs/tools/pack/cli/pack*
2222
# Tools
2323
/bin
2424
/tmp
25+
26+
/tools/bin

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,17 @@ clean:
2929
.PHONY: install-hugo
3030
install-hugo:
3131
@echo "> Installing hugo..."
32-
cd tools; go install -mod=mod --tags extended github.com/gohugoio/hugo
32+
@echo "This may take a while depending on your connection."
33+
ifeq ($(OS),Windows_NT)
34+
@echo $(shell uname -s)
35+
cd tools; mkdir bin; cd bin; curl -L -O $(shell curl https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.assets[30].browser_download_url')
36+
37+
else
38+
@echo $(shell uname -s)
39+
cd tools; mkdir bin; cd bin; curl -L -O $(shell curl https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.assets[26].browser_download_url')
40+
endif
41+
42+
3343

3444
.PHONY: upgrade-pack
3545
upgrade-pack: pack-version

0 commit comments

Comments
 (0)