Skip to content

Commit

Permalink
[ci] Add check for webui sorurce files in dist
Browse files Browse the repository at this point in the history
Checks with "make web-check" that all web ui source files are distributed as part of the release tar.
  • Loading branch information
chme committed Jan 19, 2025
1 parent c24d559 commit 0d6921c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
make
make check
make distcheck
make web-check
- name: Install
run: |
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ web-update:
$(MAKE) web-update -C web-src
web-serve:
$(MAKE) web-serve -C web-src
web-check:
$(MAKE) web-check -C web-src
web-lint:
$(MAKE) web-lint -C web-src
web-format:
Expand Down
18 changes: 17 additions & 1 deletion web-src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,24 @@ web-serve: node_modules
web-update:
$(if $(NPM),$(NPM) update)

web-check:
@echo "Verifying that all source files in 'src' and 'public' are listed in WEB_FILES ..."
@unexpected_files=0; \
for file in $$(find public src -type f); do \
if ! echo " $(WEB_FILES) " | grep -q " $$file "; then \
echo "Unknown web interface source file found: $$file"; \
unexpected_files=1; \
fi; \
done; \
if [ $$unexpected_files -eq 0 ]; then \
echo "All source files listed in WEB_FILES."; \
else \
echo "FAILURE: Unknown web interface source files found, please add them to WEB_FILES."; \
exit 1; \
fi

web-lint: node_modules
$(if $(NPM),$(NPM) run lint)
$(if $(NPM),$(NPM) run lint --no-fix)

web-format: node_modules
$(if $(NPM),$(NPM) run format)
Expand Down

0 comments on commit 0d6921c

Please sign in to comment.