mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-16 10:28:24 -07:00
18bb0f8f13
The makefile did not download the theme if the directory "themes/gitea" is there, even if empty. On a fresh Ubuntu install, curl is not included, so the theme rule fails just after creating the empty directory. When you try again after installing curl, the rule is not triggered. This could also happen if the download fails for other reasons. This change makes the theme rule depend on the file "theme.toml" which will be there only after unpacking a successfully downloaded theme archive. Signed-off-by: Alberto González Palomo <bugs@sentido-labs.com>
31 lines
483 B
Makefile
31 lines
483 B
Makefile
THEME := themes/gitea
|
|
PUBLIC := public
|
|
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf $(PUBLIC) $(THEME)
|
|
|
|
.PHONY: trans-copy
|
|
trans-copy:
|
|
@bash scripts/trans-copy
|
|
|
|
.PHONY: server
|
|
server: $(THEME)
|
|
hugo server
|
|
|
|
.PHONY: build
|
|
build: $(THEME)
|
|
hugo --cleanDestinationDir
|
|
|
|
.PHONY: update
|
|
update: $(THEME)
|
|
|
|
$(THEME): $(THEME)/theme.toml
|
|
$(THEME)/theme.toml:
|
|
mkdir -p $$(dirname $@)
|
|
curl -s $(ARCHIVE) | tar xz -C $$(dirname $@)
|