I suppose you could rename your currently installed executable from hugo.exe to smth like hugo59.exe, then download the exe for version 0.60.x in the same place on your machine and then rename the executable hugo60.exe.
Afterwards, it’s just a matter of running hugo59 server or hugo60 server alternatively
wget https://github.com/gohugoio/hugo/releases/download/v0.60.0/hugo_0.60.0_macOS-64bit.tar.gz
wget https://github.com/gohugoio/hugo/releases/download/v0.59.1/hugo_0.59.1_macOS-64bit.tar.gz
tar -zxvf ./hugo_0.60.0_macOS-64bit.tar.gz
mv ./hugo ./hugo60
tar -zxvf ./hugo_0.59.1_macOS-64bit.tar.gz
mv ./hugo ./hugo59
We got two version Hugo.
$ ./hugo60 version
Hugo Static Site Generator v0.60.0-F2DEA9B0 darwin/amd64 BuildDate: 2019-11-27T10:09:53Z
$ ./hugo59 version
Hugo Static Site Generator v0.59.1-D5DAB232 darwin/amd64 BuildDate: 2019-10-31T15:21:24Z
@peaceiris, @Mihai, Thanks for your answers.
If possible, I’d like to pursue some method that’s not alternating between two different names. Could someone please elaborate the Docker method instead? I couldn’t find details on the forum.
That would be of interest for me too.
For now, all I can think of îs having two containers with different names, each equipped with a version of the Hugo executable. That îs, only more ritualism but no esential improvement…
Ideas?
We can switch Docker images easily like the following. (Just switch tag)
# Use v0.59.1
docker run --rm -i -t -v ${PWD}:/src -p 1313:1313 peaceiris/hugo:v0.59.1 server --bind=0.0.0.0
# Use v0.60.0
docker run --rm -i -t -v ${PWD}:/src -p 1313:1313 peaceiris/hugo:v0.60.0 server --bind=0.0.0.0