Commit d9026339 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

utilisation de la feature permalink de gitlab pour construire automatiquement...

utilisation de la feature permalink de gitlab pour construire automatiquement les urls de récupération des releases de démo
parent cad9939b
#!/bin/bash
#get the last gitlab project release number
last_gitlab_project_release(){
basename $(curl -fs -o/dev/null -w %{redirect_url} $1)
}
PORT=1984
DIRECTORY=$(cd `dirname $0` && pwd)
MAX_VERSION=$(node -p -e "require('$DIRECTORY/../package.json').version")
MAX_PLUGINS_DIR=$DIRECTORY/../plugins
BASEX_CLIENT_BIN="basexclient"
BASEX_BIN="basex"
MAX_TEI_DEMO_VERION_NUMBER="v1.2"
MAX_TEI_DEMO_VERSION="max-tei-demo-"$MAX_TEI_DEMO_VERION_NUMBER
MAX_EAD_DEMO_VERION_NUMBER="v1.0"
MAX_EAD_DEMO_VERSION="max-ead-demo-"$MAX_EAD_DEMO_VERION_NUMBER
TEI_DEMO_RELEASE_URL="https://git.unicaen.fr/pdn-certic/max-tei-demo/-/archive/"$MAX_TEI_DEMO_VERION_NUMBER"/"$MAX_TEI_DEMO_VERSION".zip"
EAD_DEMO_RELEASE_URL="https://git.unicaen.fr/pdn-certic/max-ead-demo/-/archive/"$MAX_EAD_DEMO_VERION_NUMBER"/"$MAX_EAD_DEMO_VERSION".zip"
SAXON_HE_URL=https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/11.2/Saxon-HE-11.2.jar
FOP_URL=https://files.basex.org/modules/org/basex/modules/fop/FOP.jar
TEI_DEMO_URL="https://git.unicaen.fr/pdn-certic/max-tei-demo"
EAD_DEMO_URL="https://git.unicaen.fr/pdn-certic/max-ead-demo"
MAX_TEI_DEMO_VERSION_NUMBER=`last_gitlab_project_release $TEI_DEMO_URL'/-/releases/permalink/latest'`
MAX_EAD_DEMO_VERSION_NUMBER=`last_gitlab_project_release $EAD_DEMO_URL'/-/releases/permalink/latest'`
MAX_TEI_DEMO_VERSION="max-tei-demo-"$MAX_TEI_DEMO_VERSION_NUMBER
MAX_EAD_DEMO_VERSION="max-ead-demo-"$MAX_EAD_DEMO_VERSION_NUMBER
TEI_DEMO_RELEASE_URL=$TEI_DEMO_URL"/-/archive/"$MAX_TEI_DEMO_VERSION_NUMBER"/"$MAX_TEI_DEMO_VERSION".zip"
EAD_DEMO_RELEASE_URL=$EAD_DEMO_URL"/-/archive/"$MAX_EAD_DEMO_VERSION_NUMBER"/"$MAX_EAD_DEMO_VERSION".zip"
SAXON_HE_URL="https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/11.2/Saxon-HE-11.2.jar"
FOP_URL="https://files.basex.org/modules/org/basex/modules/fop/FOP.jar"
dependency_test(){
result=$(command -v $1)
......@@ -227,15 +234,15 @@ install_demo(){
fi
cd $DIRECTORY/../editions
echo "Downloading Max Demo resources at "$url .
echo "Downloading Max Demo resources at "$url
curl --silent -O $url
unzip $zip_name.zip
getResult=$?
if [ $getResult -ne 0 ]
then
echo 'MaX demo install error : Cannot fetch '$url
exit -1
fi
unzip $zip_name.zip
mv $zip_name $edition_name
rm $zip_name.zip
cd $DIRECTORY
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment