mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-22 09:54:24 +01:00
3affb02df5
- Don't rely on obscure docker images like `plugins/hugo` - Lock down `hugo` to same version the image had used - Remove unnecessary verbosity in `trans-copy` - Rename `trans-copy` to `trans-copy.sh` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john+github@jolheiser.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
37 lines
681 B
Makefile
37 lines
681 B
Makefile
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
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf $(PUBLIC) $(THEME)
|
|
|
|
.PHONY: trans-copy
|
|
trans-copy:
|
|
bash scripts/trans-copy.sh
|
|
|
|
.PHONY: server
|
|
server: $(THEME)
|
|
go run $(HUGO_PACKAGE) server
|
|
|
|
.PHONY: build
|
|
build: $(THEME)
|
|
go run $(HUGO_PACKAGE) --cleanDestinationDir
|
|
|
|
.PHONY: build-offline
|
|
build-offline: $(THEME)
|
|
go run $(HUGO_PACKAGE) --baseURL="/" --cleanDestinationDir
|
|
|
|
.PHONY: update
|
|
update: $(THEME)
|
|
|
|
$(THEME): $(THEME)/theme.toml
|
|
$(THEME)/theme.toml:
|
|
mkdir -p $$(dirname $@)
|
|
curl -L -s $(ARCHIVE) | tar xz -C $$(dirname $@)
|