fix: extract Hugo binary to temp directory before moving to final location
This commit is contained in:
parent
3bde9f322c
commit
39ae123f51
@ -9,8 +9,10 @@ RUN LATEST_RELEASE=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases
|
||||
VERSION=${LATEST_RELEASE#v} && \
|
||||
echo "Installing latest Hugo version: $VERSION" && \
|
||||
wget https://github.com/gohugoio/hugo/releases/download/${LATEST_RELEASE}/hugo_extended_${VERSION}_linux-amd64.tar.gz -O hugo.tar.gz && \
|
||||
tar -xzf hugo.tar.gz -C /usr/local/bin/ && \
|
||||
rm hugo.tar.gz && \
|
||||
mkdir -p /tmp/hugo && \
|
||||
tar -xzf hugo.tar.gz -C /tmp/hugo && \
|
||||
mv /tmp/hugo/hugo /usr/local/bin/ && \
|
||||
rm -rf /tmp/hugo hugo.tar.gz && \
|
||||
chmod +x /usr/local/bin/hugo && \
|
||||
hugo version
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user