2024-02-25 09:22:07 +01:00
|
|
|
#!/usr/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ -z "$1" ]]; then
|
|
|
|
echo "Please enter the version you want to update to";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
VERSION="$1"
|
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo "patching spec file and downloading the tarball"
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
|
2024-04-25 04:47:42 +02:00
|
|
|
sed -i -e 's|Version: .*|Version: '${VERSION}'|g' forgejo.spec
|
2024-02-25 09:22:07 +01:00
|
|
|
osc service ra download_files
|
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo "extracting package-lock.json"
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
|
2024-04-25 04:47:42 +02:00
|
|
|
tar xf forgejo-src-${VERSION}.tar.gz forgejo-src-${VERSION}/package-lock.json
|
|
|
|
cp forgejo-src-${VERSION}/package-lock.json .
|
2024-02-25 09:22:07 +01:00
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo "Downloading node_modules"
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
|
|
|
|
osc service ra node_modules
|
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo "Cleanup Step"
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
|
2024-04-25 04:47:42 +02:00
|
|
|
rm -r forgejo-src-${VERSION}
|
2024-02-25 09:22:07 +01:00
|
|
|
rm node_modules.sums
|
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo "Done! Have fun building and testing"
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++"
|