Build and ship LICENSE file

Bring back terser-webpack-plugin from commit c52136c051 and re-enable
it. It builds the autogenerated dist/index.js.LICENSE.txt which is quite
important for shipping distribution packages -- c-{podman,machines} both
do this.

Backport 95021c336e
to make sure that the webpack for the release tarball is *actually*
built in production mode.
This commit is contained in:
Martin Pitt 2021-04-09 16:10:40 +02:00 committed by Katerina Koukiou
parent c52136c051
commit 2624dbb891
4 changed files with 6 additions and 2 deletions

View file

@ -85,7 +85,7 @@ dist-gzip: $(TARFILE)
# we don't ship node_modules for license and compactness reasons; we ship a
# pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that
# node_modules/ can be reconstructed if necessary)
$(TARFILE): NODE_ENV=production
$(TARFILE): export NODE_ENV=production
$(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec
if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi
mv node_modules node_modules.release