From 4ca75f143c40794ee22799da4780cc2154c757c6 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 9 Sep 2021 14:17:55 +0200 Subject: [PATCH] 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`. --- .gitignore | 2 +- Makefile | 8 ++++---- README.md | 2 +- cockpit-starter-kit.spec.in | 2 +- packit.yaml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 59b5f3d..3eaef89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *~ *.retry -*.tar.gz +*.tar.xz *.rpm node_modules/ dist/ diff --git a/Makefile b/Makefile index 48a8c69..e8aa2a5 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ ifeq ($(TEST_OS),) TEST_OS = centos-8-stream endif 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 RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) @@ -79,7 +79,7 @@ devel-install: $(WEBPACK_TEST) print-version: @echo "$(VERSION)" -dist-gzip: $(TARFILE) +dist: $(TARFILE) @ls -1 $(TARFILE) # 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 touch -r package.json $(NODE_MODULES_TEST) 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 \ $$(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 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 diff --git a/README.md b/README.md index 7b9e3c2..73d76b3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ make `make install` compiles and installs the package in `/usr/share/cockpit/`. The 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 automatically minified and compressed. Set `NODE_ENV=production` if you want to duplicate this behavior. diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 49c06fe..76379ff 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -4,7 +4,7 @@ Release: 1%{?dist} Summary: Cockpit Starter Kit Example Module License: LGPLv2+ -Source: cockpit-starter-kit-%{version}.tar.gz +Source: cockpit-starter-kit-%{version}.tar.xz BuildArch: noarch BuildRequires: make BuildRequires: libappstream-glib diff --git a/packit.yaml b/packit.yaml index 1b0e37f..ad67ffe 100644 --- a/packit.yaml +++ b/packit.yaml @@ -13,7 +13,7 @@ actions: - make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500 # dummy LICENSE.txt, as terser did not run - 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 get-current-version: make print-version jobs: