From 911d274467e85151fc63cabb6fe8eae2e8d16a65 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Wed, 21 Aug 2024 23:03:26 +0200 Subject: [PATCH] fucking ubuntu shit outdated repos, fuck canonical --- .gitea/workflows/deploy.yaml | 6 +++++- makefile | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 41c72c7..ae31b6d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -17,7 +17,11 @@ jobs: steps: - run: echo "${{ secrets.SSH_PRIVATE_KEY }}" > /private.key - run: chmod 600 /private.key - - run: apt update && apt install -y hugo + - run: | + export HUGO_VERSION=$(curl --silent -I https://github.com/gohugoio/hugo/releases/latest | grep location | sed 's|.*tag/||' | tr -d '\r') + export HUGO_VERSION_SHORT=$(echo ${HUGO_VERSION} | sed 's/v//') + wget https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_${HUGO_VERSION_SHORT}_linux-amd64.deb + dpkg -i hugo_*.deb - uses: actions/checkout@v4 - run: APP_VERSION=latest make - run: | diff --git a/makefile b/makefile index 72cbc17..70921c7 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ include .vars default: build prep: - git submodule foreach --recursive bash -c "git checkout $$(git remote show origin | grep HEAD | sed 's/.*\: //'); git pull" + git submodule foreach --recursive bash -c "git checkout \$$(git remote show origin | grep HEAD | sed 's/.*\: //'); git pull" build: prep ./version.sh