Mentions légales du service

Skip to content
Snippets Groups Projects
Commit da2798f3 authored by hhakim's avatar hhakim
Browse files

Add a script to generate a package download page and call it in ci gitlab-pages job.

parent 826e3af8
No related branches found
No related tags found
No related merge requests found
Pipeline #834042 skipped
......@@ -311,6 +311,8 @@ pages:
- mkdir -p ../public/last-doc
- cp -Rf doc/html ../public/last-doc/
- mkdir -p ../public/last-doc/packages
- ../gen_doc/gen_pkg_dl_page.sh $CI_COMMIT_TAG # download.html generated
- mv download.html ../public/last-doc/packages/
- mv *.pkg *.rpm *.deb *.exe ../public/last-doc/packages/
needs:
- job: pkg_macos_release
......
#!/bin/bash
function usage
{
echo "$0 <faust_version> [<filepath>]"
}
function sha256sum_or_not_found
{
[ -r "$1" ] && sha256sum $1 || echo "file not found"
}
function generate_html
{
echo "<b>Latest FAµST version: $VERSION ($(date +%D))"
echo "<table cellpadding="5">"
echo "<tr><th>System</th><th>Link</th><th>SHA256</th></tr>"
for CONF in "Linux RPM::faust-$VERSION-x86_64.rpm" "Linux DEB::faust-$VERSION-x86_64.deb" "Windows 10 EXE::faust-$VERSION-amd64.exe" "Mac OS X PKG::faust-$VERSION.pkg"
do
SYS=${CONF%%::*}
FILE=${CONF##*::}
echo "<tr><td>$SYS</td><td><a href=\"https://faustgrp.gitlabpages.inria.fr/faust/last-doc/packages/$FILE\">$FILE</a></td><td>$(sha256sum_or_not_found $FILE)</td></tr>"
done
echo "</table>"
}
[[ $# < 1 ]] && usage && exit 1
VERSION=$1
[[ ! VERSION =~ ^([[:digit:]].?)+$ ]] || (echo "$VERSION is not a valid version tag.")
if [[ $# -gt 3 ]]
then
FILEPATH=$2
else
FILEPATH="download.html"
fi
generate_html > $FILEPATH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment