From 0228b526f6c18a20d5fb0546868fda176873adbb Mon Sep 17 00:00:00 2001 From: Athanasia Monika Mowinckel Date: Thu, 18 Apr 2024 11:50:54 +0200 Subject: [PATCH] get hugoversion from file --- .Rprofile | 2 +- .github/workflows/build-preview.yaml | 2 +- .github/workflows/build-production.yaml | 2 +- .hugoversion | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .hugoversion diff --git a/.Rprofile b/.Rprofile index b574ba4d7..1860a71f4 100644 --- a/.Rprofile +++ b/.Rprofile @@ -13,7 +13,7 @@ options( blogdown.ext = ".Rmd", blogdown.subdir = "blog", blogdown.title_case = TRUE, - blogdown.hugo.version = "0.111.2", + blogdown.hugo.version = readLines(".hugoversion"), renv.config.sandbox.enabled = FALSE, renv.config.auto.snapshot = FALSE diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml index 4b6fa5723..290b8a5eb 100644 --- a/.github/workflows/build-preview.yaml +++ b/.github/workflows/build-preview.yaml @@ -45,7 +45,7 @@ jobs: steps: - name: Set env parameters run: | - ver=$(cat .Rprofile | grep hugo.version | cut -d"=" -f2 | sed -e s.\"..g | sed -e s.\ ..g | sed -e s.,..g) + ver=$(cat .hugoversion) echo "hugovr=$ver" >> $GITHUB_ENV echo "repo_owner=$(dirname ${{ env.repo_name }})" >> $GITHUB_ENV echo "repo_name=$(basename ${{ env.repo_name }})" >> $GITHUB_ENV diff --git a/.github/workflows/build-production.yaml b/.github/workflows/build-production.yaml index fbeb5c2f0..c7fc4697d 100644 --- a/.github/workflows/build-production.yaml +++ b/.github/workflows/build-production.yaml @@ -23,7 +23,7 @@ jobs: steps: - name: Set env parameters run: | - ver=$(cat .Rprofile | grep hugo.version | cut -d"=" -f2 | sed -e s.\"..g | sed -e s.\ ..g | sed -e s.,..g) + ver=$(cat .hugoversion) echo "hugovr=$ver" >> $GITHUB_ENV - name: Checkout repository diff --git a/.hugoversion b/.hugoversion new file mode 100644 index 000000000..4b9232bf1 --- /dev/null +++ b/.hugoversion @@ -0,0 +1 @@ +0.111.2 \ No newline at end of file