mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 06:43:34 +01:00
Use a file as make evidence for fomantic instead of a directory (#10032)
* Use evidence file as dependency instead of dir * fix eol * Update .gitignore Co-Authored-By: silverwind <me@silverwind.io> * Use FOMANTIC_SOURCES to establish dependencies as per @silverwind Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
ce7062a422
commit
72f9cfc8f0
2 changed files with 11 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -83,3 +83,6 @@ prime/
|
||||||
*.snap-build
|
*.snap-build
|
||||||
*_source.tar.bz2
|
*_source.tar.bz2
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# Make evidence files
|
||||||
|
/.make_evidence
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -29,6 +29,7 @@ GOFLAGS := -v
|
||||||
EXTRA_GOFLAGS ?=
|
EXTRA_GOFLAGS ?=
|
||||||
|
|
||||||
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
|
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
|
||||||
|
MAKE_EVIDENCE_DIR := .make_evidence
|
||||||
|
|
||||||
ifneq ($(RACE_ENABLED),)
|
ifneq ($(RACE_ENABLED),)
|
||||||
GOTESTFLAGS ?= -race
|
GOTESTFLAGS ?= -race
|
||||||
|
@ -58,7 +59,10 @@ BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/tem
|
||||||
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
||||||
|
|
||||||
WEBPACK_DEST_DIRS := public/js public/css
|
WEBPACK_DEST_DIRS := public/js public/css
|
||||||
|
|
||||||
|
FOMANTIC_SOURCES ?= $(shell find web_src/fomantic -type f)
|
||||||
FOMANTIC_DEST_DIR := public/fomantic
|
FOMANTIC_DEST_DIR := public/fomantic
|
||||||
|
FOMANTIC_EVIDENCE := $(MAKE_EVIDENCE_DIR)/fomantic
|
||||||
|
|
||||||
TAGS ?=
|
TAGS ?=
|
||||||
|
|
||||||
|
@ -139,7 +143,7 @@ node-check:
|
||||||
|
|
||||||
.PHONY: clean-all
|
.PHONY: clean-all
|
||||||
clean-all: clean
|
clean-all: clean
|
||||||
rm -rf $(WEBPACK_DEST_DIRS) $(FOMANTIC_DEST_DIR)
|
rm -rf $(WEBPACK_DEST_DIRS) $(FOMANTIC_DEST_DIR) $(FOMANTIC_EVIDENCE)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
@ -498,13 +502,13 @@ css:
|
||||||
$(MAKE) webpack
|
$(MAKE) webpack
|
||||||
|
|
||||||
.PHONY: fomantic
|
.PHONY: fomantic
|
||||||
fomantic: node-check $(FOMANTIC_DEST_DIR)
|
fomantic: node-check $(FOMANTIC_EVIDENCE)
|
||||||
|
|
||||||
$(FOMANTIC_DEST_DIR): semantic.json web_src/fomantic/theme.config.less | node_modules
|
$(FOMANTIC_EVIDENCE): semantic.json $(FOMANTIC_SOURCES) | node_modules
|
||||||
cp web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config
|
cp web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config
|
||||||
cp web_src/fomantic/_site/globals/* node_modules/fomantic-ui/src/_site/globals/
|
cp web_src/fomantic/_site/globals/* node_modules/fomantic-ui/src/_site/globals/
|
||||||
npx gulp -f node_modules/fomantic-ui/gulpfile.js build
|
npx gulp -f node_modules/fomantic-ui/gulpfile.js build
|
||||||
@touch $(FOMANTIC_DEST_DIR)
|
@mkdir -p $(MAKE_EVIDENCE_DIR) && touch $(FOMANTIC_EVIDENCE)
|
||||||
|
|
||||||
.PHONY: webpack
|
.PHONY: webpack
|
||||||
webpack: node-check $(WEBPACK_DEST)
|
webpack: node-check $(WEBPACK_DEST)
|
||||||
|
|
Loading…
Reference in a new issue