Move to xz dist tarballs

For consistency with the already xz'ed node tarball.

Rename the oddly named `dist-gzip` target to the standard `dist`.
This commit is contained in:
Martin Pitt 2021-09-09 14:17:55 +02:00 committed by Katerina Koukiou
parent 26be6c8540
commit 4ca75f143c
5 changed files with 8 additions and 8 deletions

2
.gitignore vendored
View file

@ -1,6 +1,6 @@
*~ *~
*.retry *.retry
*.tar.gz *.tar.xz
*.rpm *.rpm
node_modules/ node_modules/
dist/ dist/

View file

@ -5,7 +5,7 @@ ifeq ($(TEST_OS),)
TEST_OS = centos-8-stream TEST_OS = centos-8-stream
endif endif
export TEST_OS export TEST_OS
TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz
NODE_CACHE=cockpit-$(PACKAGE_NAME)-node-$(VERSION).tar.xz NODE_CACHE=cockpit-$(PACKAGE_NAME)-node-$(VERSION).tar.xz
RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm
VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)
@ -79,7 +79,7 @@ devel-install: $(WEBPACK_TEST)
print-version: print-version:
@echo "$(VERSION)" @echo "$(VERSION)"
dist-gzip: $(TARFILE) dist: $(TARFILE)
@ls -1 $(TARFILE) @ls -1 $(TARFILE)
# when building a distribution tarball, call webpack with a 'production' environment # when building a distribution tarball, call webpack with a 'production' environment
@ -91,7 +91,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec
if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi
touch -r package.json $(NODE_MODULES_TEST) touch -r package.json $(NODE_MODULES_TEST)
touch dist/* touch dist/*
tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ tar --xz -cf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \
--exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \
$$(git ls-files) $(LIB_TEST) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ $$(git ls-files) $(LIB_TEST) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/
@ -170,4 +170,4 @@ $(NODE_MODULES_TEST): package.json
env -u NODE_ENV npm install env -u NODE_ENV npm install
env -u NODE_ENV npm prune env -u NODE_ENV npm prune
.PHONY: all clean install devel-install print-version dist-gzip node-cache srpm rpm check vm update-po .PHONY: all clean install devel-install print-version dist node-cache srpm rpm check vm update-po

View file

@ -17,7 +17,7 @@ make
`make install` compiles and installs the package in `/usr/share/cockpit/`. The `make install` compiles and installs the package in `/usr/share/cockpit/`. The
convenience targets `srpm` and `rpm` build the source and binary rpms, convenience targets `srpm` and `rpm` build the source and binary rpms,
respectively. Both of these make use of the `dist-gzip` target, which is used respectively. Both of these make use of the `dist` target, which is used
to generate the distribution tarball. In `production` mode, source files are to generate the distribution tarball. In `production` mode, source files are
automatically minified and compressed. Set `NODE_ENV=production` if you want to automatically minified and compressed. Set `NODE_ENV=production` if you want to
duplicate this behavior. duplicate this behavior.

View file

@ -4,7 +4,7 @@ Release: 1%{?dist}
Summary: Cockpit Starter Kit Example Module Summary: Cockpit Starter Kit Example Module
License: LGPLv2+ License: LGPLv2+
Source: cockpit-starter-kit-%{version}.tar.gz Source: cockpit-starter-kit-%{version}.tar.xz
BuildArch: noarch BuildArch: noarch
BuildRequires: make BuildRequires: make
BuildRequires: libappstream-glib BuildRequires: libappstream-glib

View file

@ -13,7 +13,7 @@ actions:
- make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500 - make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500
# dummy LICENSE.txt, as terser did not run # dummy LICENSE.txt, as terser did not run
- touch dist/index.js.LICENSE.txt.gz - touch dist/index.js.LICENSE.txt.gz
- make dist-gzip - make dist
# starter-kit.git has no release tags; your project can drop this once you have a release # starter-kit.git has no release tags; your project can drop this once you have a release
get-current-version: make print-version get-current-version: make print-version
jobs: jobs: