From 34a438c88a9ab93ae1943f8295b61cc2eb2d3008 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Thu, 22 Dec 2022 10:22:57 +0800 Subject: [PATCH] fix: run hugo directly instead of plugin image (#115) ref: https://github.com/go-gitea/gitea/pull/22206 Co-authored-by: jolheiser Reviewed-on: https://gitea.com/gitea/website/pulls/115 Reviewed-by: techknowlogick Reviewed-by: Lunny Xiao Co-authored-by: John Olheiser Co-committed-by: John Olheiser --- .drone.yml | 3 +-- Makefile | 8 +++++--- scripts/{trans-copy => trans-copy.sh} | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) rename scripts/{trans-copy => trans-copy.sh} (92%) diff --git a/.drone.yml b/.drone.yml index 43f9496..52ae77f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,9 +13,8 @@ workspace: steps: - name: build pull: always - image: plugins/hugo:latest + image: golang:1.19 commands: - - apk add --no-cache make bash curl - make clean - make build diff --git a/Makefile b/Makefile index c57e8cc..843b381 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ THEME := themes/gitea PUBLIC := public ARCHIVE := https://dl.gitea.io/theme/master.tar.gz +HUGO_PACKAGE := github.com/gohugoio/hugo@v0.81.0 + .PHONY: all all: build @@ -11,15 +13,15 @@ clean: .PHONY: trans-copy trans-copy: - @bash scripts/trans-copy + bash scripts/trans-copy.sh .PHONY: server server: $(THEME) - hugo server + go run $(HUGO_PACKAGE) server .PHONY: build build: $(THEME) - hugo --cleanDestinationDir + go run $(HUGO_PACKAGE) --cleanDestinationDir .PHONY: update update: $(THEME) diff --git a/scripts/trans-copy b/scripts/trans-copy.sh similarity index 92% rename from scripts/trans-copy rename to scripts/trans-copy.sh index 88b9ac8..bbf64c7 100755 --- a/scripts/trans-copy +++ b/scripts/trans-copy.sh @@ -27,7 +27,6 @@ for SOURCE in $(find ${ROOT}/content -type f -iname *.en-us.md); do DEST="${SOURCE%.en-us.md}.${LOCALE}.md" if [[ ! -f ${DEST} ]]; then - echo "Creating fallback for ${DEST#${ROOT}/content/}" cp ${SOURCE} ${DEST} fi done