From e41b2a3235980ccd1a4523151974caa9ed578b8b Mon Sep 17 00:00:00 2001 From: Dylan McCall Date: Thu, 15 Jun 2023 12:09:27 -0700 Subject: [PATCH 1/3] Get collections from the latest release Instead of downloading collections from the newest commit, use the most recent release from endless-key-collections. --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5f32d04c..90e94c0b 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ ARCH_OPTIONS := $(foreach arch,$(ARCHES),--arch=$(arch)) OSNAME := $(shell uname -s) +COLLECTIONS_TARBALL_URL := $(shell curl -s https://api.github.com/repos/endlessm/endless-key-collections/releases/latest | jq '.tarball_url' --raw-output) + ifeq ($(OSNAME), Darwin) PLATFORM := macosx else @@ -139,18 +141,16 @@ clean-apps-bundle: src/apps-bundle: clean-apps-bundle apps-bundle.zip unzip -qo apps-bundle.zip -d src/apps-bundle -.PHONY: collections.zip -collections.zip: - wget -N https://github.com/endlessm/endless-key-collections/archive/refs/heads/main.zip - mv main.zip collections.zip +.PHONY: collections.tar.gz +collections.tar.gz: + wget -N ${COLLECTIONS_TARBALL_URL} -O collections.tar.gz clean-collections: - rm -rf src/collections -src/collections: clean-collections collections.zip - unzip -qo collections.zip - mv endless-key-collections-main/json/ src/collections - rm -rf endless-key-collections-main +src/collections: clean-collections collections.tar.gz + mkdir -p src/collections + tar -xz -f collections.tar.gz -C src/collections --overwrite '*/json/*.json' --strip-components=2 clean-local-kolibri-explore-plugin: # The * is to also remove the VERSION.dist-info directory: From c7dc8acd9585f945f5d7ca7cef9eb020f50576dc Mon Sep 17 00:00:00 2001 From: Jian-Hong Pan Date: Tue, 20 Jun 2023 14:10:50 +0800 Subject: [PATCH 2/3] Dockerfiles: Add curl and jq as dependent tools Fixes commit e41b2a323598 ("Get collections from the latest release"). --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 162fdb1d..ca5fed92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,9 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ autopoint \ build-essential \ ccache \ + curl \ git \ + jq \ libffi-dev \ libssl-dev \ libtool \ From 1e0dfdbaa320fa2b73a319f2698f78190521d9b7 Mon Sep 17 00:00:00 2001 From: Jian-Hong Pan Date: Tue, 20 Jun 2023 20:49:34 +0800 Subject: [PATCH 3/3] fixup! Get collections from the latest release --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 90e94c0b..deb3d313 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,7 @@ clean-collections: src/collections: clean-collections collections.tar.gz mkdir -p src/collections - tar -xz -f collections.tar.gz -C src/collections --overwrite '*/json/*.json' --strip-components=2 + tar -xz -f collections.tar.gz -C src/collections --strip-components=2 --wildcards */json/*.json clean-local-kolibri-explore-plugin: # The * is to also remove the VERSION.dist-info directory: