- 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
This commit is contained in:
Elisei Roca 2024-12-02 18:39:39 +00:00 committed by Git OBS Bridge
parent 697ba36d6c
commit ca276bea6d
3 changed files with 24 additions and 15 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Dec 2 18:37:12 UTC 2024 - Elisei Roca <eroca@suse.com>
- Update assets cache and improve update-cache.sh script
-------------------------------------------------------------------
Thu Nov 28 14:27:21 UTC 2024 - Andrii Nikitin <andrii.nikitin@suse.com>

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bdef48ca0c3172c7cf9d3f21d7f8d588c6d14685edb1c98c89cca28067149ed
size 1034197
oid sha256:e481f243e41ade4f45105e417e854466e1dc2aa13b7f0a593b7803faf42d449f
size 1021769

View File

@ -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/*