CI: don't push downloaded cache
This commit is contained in:
@@ -8,7 +8,7 @@ path_to_file="$3.xz"
|
|||||||
basename="$(basename $path_to_file)"
|
basename="$(basename $path_to_file)"
|
||||||
|
|
||||||
curl "https://git.mrcyjanek.net/api/packages/mrcyjanek/generic/monero_c/${cache_name}-${cache_key}/${basename}" > /tmp/cache
|
curl "https://git.mrcyjanek.net/api/packages/mrcyjanek/generic/monero_c/${cache_name}-${cache_key}/${basename}" > /tmp/cache
|
||||||
if [[ "xpackage does not exist" == "x$(head -1 /tmp/cache)" ]];
|
if [[ "xpackage does not exist" == "x$(head -1 /tmp/cache 2>/dev/null)" ]];
|
||||||
then
|
then
|
||||||
echo "Cache miss '$1' '$2' '$basename'"
|
echo "Cache miss '$1' '$2' '$basename'"
|
||||||
rm /tmp/cache
|
rm /tmp/cache
|
||||||
@@ -20,4 +20,9 @@ fi
|
|||||||
mkdir -p $path_to_file
|
mkdir -p $path_to_file
|
||||||
rm -rf $path_to_file
|
rm -rf $path_to_file
|
||||||
mv /tmp/cache $path_to_file
|
mv /tmp/cache $path_to_file
|
||||||
unxz $path_to_file || rm $path_to_file
|
unxz $path_to_file || rm $path_to_file
|
||||||
|
|
||||||
|
if [[ -f "$3" ]];
|
||||||
|
then
|
||||||
|
touch /tmp/cache_hit_$(echo "$3" | md5sum)
|
||||||
|
fi
|
||||||
@@ -5,6 +5,13 @@ registry_user=mrcyjanek
|
|||||||
cache_name="$1"
|
cache_name="$1"
|
||||||
cache_key="$2"
|
cache_key="$2"
|
||||||
path_to_file_="$3"
|
path_to_file_="$3"
|
||||||
|
|
||||||
|
if [[ -f "/tmp/cache_hit_$(echo "$3" | md5sum)" ]];
|
||||||
|
then
|
||||||
|
echo "was cached $1 $2 $(basename $path_to_file_)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
path_to_file="$3.xz"
|
path_to_file="$3.xz"
|
||||||
basename="$(basename $path_to_file)"
|
basename="$(basename $path_to_file)"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user