Skip to content

Commit f55eb7c

Browse files
committed
Update make_opam_files to upload the archive to the releases folder on github to avoid issues with github rebuilding the tarballs
1 parent 9af0b0f commit f55eb7c

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

make-opam-files.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,33 @@ then
66
exit 0
77
fi
88

9+
archive=`basename $3`
10+
tag=${archive/.tar.gz/}
11+
912
echo "Target directory: " $1
1013
echo "Target version: " $2
1114
echo "Releases package: " $3
15+
echo "Archive:" $archive
16+
echo "Tag:" $tag
17+
18+
if [ -f $archive ]
19+
then
20+
echo "Removing existing archive!"
21+
rm $archive
22+
fi
1223

1324
wget $3
14-
archive=`basename $3`
25+
1526
hash=`shasum -a 512 $archive | cut -f 1 -d " "`
1627

1728
echo "Shasum = " $hash
1829

30+
echo "Uploading to release assets"
31+
32+
gh release upload $tag $archive
33+
34+
release=https://github.com/MetaCoq/metacoq/releases/download/$tag/$archive
35+
1936
for f in *.opam;
2037
do
2138
opamf=${f/.opam/};
@@ -24,7 +41,7 @@ do
2441
mkdir -p $1/$opamf/$opamf.$2
2542
gsed -e "/^version:.*/d" $f > $target
2643
echo url { >> $target
27-
echo " src:" \"$3\" >> $target
44+
echo " src:" \"$release\" >> $target
2845
echo " checksum:" \"sha512=$hash\" >> $target
2946
echo } >> $target
3047
done

0 commit comments

Comments
 (0)