Skip to content

Commit

Permalink
Build fixes (force build after watch + buildclean before dist)
Browse files Browse the repository at this point in the history
  • Loading branch information
n-peugnet committed May 5, 2024
1 parent 9f3eb16 commit e5dc98e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ assets/js/*
database/*
media/*
render/
build/
dist/
vendor/*
node_modules/
config.json
error_log
.BUILDDATE
VERSION
!README.md
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ all: vendor build

# Build generated files.
.PHONY: build
build: VERSION $(js_build_dir);
build: VERSION .BUILDDATE;

.PHONY: dev
dev: MAKEFLAGS += j2
Expand Down Expand Up @@ -78,7 +78,7 @@ release-patch release-minor release-major: release-%: check node_modules

# Generate the distribution files.
.PHONY: dist
dist: distclean
dist: distclean buildclean
@touch composer.lock
$(MAKE) $(zip_release) DIST=1
@touch composer.lock
Expand Down Expand Up @@ -114,9 +114,9 @@ dist/w_cms_%.zip: all
src/\* \
tests/\*

$(js_build_dir): $(entrypoints) src/fn/fn.js node_modules
.BUILDDATE: $(entrypoints) src/fn/fn.js node_modules
esbuild $(entrypoints) $(ESBUILD_FLAGS) --sourcemap --minify
touch $@
@date --iso-8601=seconds > $@

# Generate a .env file if none is present.
.env:
Expand Down Expand Up @@ -156,7 +156,7 @@ distclean:
# Clean files generated by `make build`.
.PHONY: buildclean
buildclean:
rm -rf $(js_build_dir)
rm -rf $(js_build_dir) .BUILDDATE

# Run all checks.
.PHONY: check
Expand Down

0 comments on commit e5dc98e

Please sign in to comment.