From f55eb7c21ddfefde4cb08116232428e38ed2ee33 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Tue, 19 Mar 2024 10:24:20 +0100 Subject: [PATCH] Update make_opam_files to upload the archive to the releases folder on github to avoid issues with github rebuilding the tarballs --- make-opam-files.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/make-opam-files.sh b/make-opam-files.sh index 2d88765ce..f448ac508 100755 --- a/make-opam-files.sh +++ b/make-opam-files.sh @@ -6,16 +6,33 @@ then exit 0 fi +archive=`basename $3` +tag=${archive/.tar.gz/} + echo "Target directory: " $1 echo "Target version: " $2 echo "Releases package: " $3 +echo "Archive:" $archive +echo "Tag:" $tag + +if [ -f $archive ] +then + echo "Removing existing archive!" + rm $archive +fi wget $3 -archive=`basename $3` + hash=`shasum -a 512 $archive | cut -f 1 -d " "` echo "Shasum = " $hash +echo "Uploading to release assets" + +gh release upload $tag $archive + +release=https://github.com/MetaCoq/metacoq/releases/download/$tag/$archive + for f in *.opam; do opamf=${f/.opam/}; @@ -24,7 +41,7 @@ do mkdir -p $1/$opamf/$opamf.$2 gsed -e "/^version:.*/d" $f > $target echo url { >> $target - echo " src:" \"$3\" >> $target + echo " src:" \"$release\" >> $target echo " checksum:" \"sha512=$hash\" >> $target echo } >> $target done \ No newline at end of file