Skip to content

Commit

Permalink
Replace phony copy-bundle-assets target by a real one
Browse files Browse the repository at this point in the history
This makes that we don't rerun the rule during
`domserver-install` if it already ran during `domserver`, so
that if you install as root, the local files are still owned
by the user who first ran `make domserver`, not root.

This does assume that if the directory `public/bundles/nelmioapidoc`
exists, then it contains the assets, and these won't automatically
get updated, for example, in the setting of a maintainer-install.
  • Loading branch information
eldering authored and vmcj committed Sep 22, 2024
1 parent 5ac5bc2 commit 5df9ff5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions webapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,18 @@ composer-dump-autoload-dev:
@echo "# the DOMjudge Symfony application in developer mode. Adjust as needed." >> $@
@echo "APP_ENV=dev" >> $@

copy-bundle-assets:
public/bundles/nelmioapidoc:
# We can not use bin/console here, as when using a fakeroot,
# the include paths are broken. We just copy in the data we need
-rm -rf public/bundles/nelmioapidoc
mkdir -p public/bundles/nelmioapidoc
cp -a vendor/nelmio/api-doc-bundle/public/* public/bundles/nelmioapidoc/
-rm -rf $@
mkdir -p $@
cp -a vendor/nelmio/api-doc-bundle/public/* $@

clean-l:
-rm -rf public/bundles/nelmioapidoc
-rm -f vendor/autoload_runtime.php

domserver-l:
# This must be done first to install with the rest.
$(MAKE) copy-bundle-assets
domserver-l: public/bundles/nelmioapidoc

install-domserver:
$(INSTALL_DIR) $(DESTDIR)$(domserver_webappdir);
Expand Down Expand Up @@ -88,5 +86,4 @@ maintainer-clean-l:
done ; \
done

.PHONY: composer-dump-autoload composer-dump-autoload-dev \
copy-bundle-assets
.PHONY: composer-dump-autoload-dev

0 comments on commit 5df9ff5

Please sign in to comment.