From ca276bea6d3f8d48faebeb0eee17da4548c648922cb76173c05d6ec0a2c759e7 Mon Sep 17 00:00:00 2001 From: Elisei Roca Date: Mon, 2 Dec 2024 18:39:39 +0000 Subject: [PATCH] - Update assets cache and improve update-cache.sh script OBS-URL: https://build.opensuse.org/package/show/openSUSE:infrastructure:MirrorCache/MirrorCache?expand=0&rev=121 --- MirrorCache.changes | 5 +++++ cache.tar.xz | 4 ++-- update-cache.sh | 30 +++++++++++++++++------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/MirrorCache.changes b/MirrorCache.changes index 014b6e5..1bf1546 100644 --- a/MirrorCache.changes +++ b/MirrorCache.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 2 18:37:12 UTC 2024 - Elisei Roca + +- Update assets cache and improve update-cache.sh script + ------------------------------------------------------------------- Thu Nov 28 14:27:21 UTC 2024 - Andrii Nikitin diff --git a/cache.tar.xz b/cache.tar.xz index ba78d42..f120327 100644 --- a/cache.tar.xz +++ b/cache.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bdef48ca0c3172c7cf9d3f21d7f8d588c6d14685edb1c98c89cca28067149ed -size 1034197 +oid sha256:e481f243e41ade4f45105e417e854466e1dc2aa13b7f0a593b7803faf42d449f +size 1021769 diff --git a/update-cache.sh b/update-cache.sh index bb54fd5..ce19fbe 100644 --- a/update-cache.sh +++ b/update-cache.sh @@ -1,20 +1,24 @@ -#! /bin/sh +#!/usr/bin/bash + +# requirements: +# bzip2 cpio perl-IO-Socket-SSL perl-Mojolicious +# perl-Mojolicious-Plugin-AssetPack ruby3.3-rubygem-sass set -e export LC_ALL='en_US.UTF-8' export LANG='en_US.UTF-8' -osc up -rm -f _service\:* -rm -f *.tar *.cpio -osc service lr -# special call for tar buildtime service -osc service lr tar -SD=$PWD -cd MirrorCache -tools/generate-packed-assets -tar cvjf ../cache.tar.xz assets/cache assets/assetpack.db +mkdir -p MirrorCache-update-cache +rm -rf MirrorCache-update-cache/* +pushd MirrorCache-update-cache -cd "$SD" -osc up +cpio -id < ../MirrorCache-*.obscpio +pushd MirrorCache-* + +./tools/generate-packed-assets +tar cvjf ../../cache.tar.xz assets/cache assets/assetpack.db + +popd +popd +rm -rf MirrorCache-update-cache/*