Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 118a951f authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Fix issue with automatic generation of changelog

parent 66ddec96
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ function gen_changelog() ...@@ -10,6 +10,7 @@ function gen_changelog()
lastline=$(( lastline - 1 )) lastline=$(( lastline - 1 ))
#echo $lastline #echo $lastline
changelog="Changes:\n"
for i in `seq $firstline $lastline` for i in `seq $firstline $lastline`
do do
local line=$( head -n $i ChangeLog | tail -n 1 ) local line=$( head -n $i ChangeLog | tail -n 1 )
...@@ -17,7 +18,7 @@ function gen_changelog() ...@@ -17,7 +18,7 @@ function gen_changelog()
#echo $line #echo $line
done done
changelog="${changelog}\nWARNING: Download the source archive by clicking on the link __Download release__ above, please do not consider the link Source code to get all submodules.\n" changelog="${changelog}\n__WARNING__: Download the source archive by clicking on the link __Download release__ above, please do not consider the link Source code to get all submodules.\n"
} }
release="" release=""
...@@ -38,6 +39,10 @@ then ...@@ -38,6 +39,10 @@ then
exit 1 exit 1
fi fi
# extract the change log from ChangeLog
gen_changelog
echo $changelog
# generate the archive # generate the archive
mkdir -p build-release mkdir -p build-release
cd build-release cd build-release
...@@ -48,10 +53,6 @@ make package_source ...@@ -48,10 +53,6 @@ make package_source
GETURL=`echo curl --request POST --header \"PRIVATE-TOKEN: $RELEASE_TOKEN\" --form \"file=\@chameleon-$RELEASE_NAME.tar.gz\" https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/uploads` GETURL=`echo curl --request POST --header \"PRIVATE-TOKEN: $RELEASE_TOKEN\" --form \"file=\@chameleon-$RELEASE_NAME.tar.gz\" https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/uploads`
MYURL=`eval $GETURL | jq .url | sed "s#\"##g"` MYURL=`eval $GETURL | jq .url | sed "s#\"##g"`
# extract the change log from ChangeLog
gen_changelog
echo $changelog
# Try to remove the release if it already exists # Try to remove the release if it already exists
curl --request DELETE --header "PRIVATE-TOKEN: $RELEASE_TOKEN" https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/releases/v$RELEASE_NAME curl --request DELETE --header "PRIVATE-TOKEN: $RELEASE_TOKEN" https://gitlab.inria.fr/api/v4/projects/$CI_PROJECT_ID/releases/v$RELEASE_NAME
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment