Commit c75ac721 authored by Grand Francois's avatar Grand Francois
Browse files

fix(ci): release-version.sh failure on releases.json update

parent 3d0c4893
Pipeline #35855 passed with stages
in 41 minutes and 16 seconds
......@@ -42,11 +42,11 @@ if (( $update_latest )); then
# fetch current releases file
scp "$HOST_LOGIN:$RELEASES_FILE" "./$TMP_RELEASES_FILE"
grep -P "\"latest\": \"$VERSION\"" "$TMP_RELEASES_FILE"
if [[ $? == 0 ]]; then
if [[ -n $(grep -P "\"latest\": \"$VERSION\"" "$TMP_RELEASES_FILE") ]]; then
echo "$VERSION est déjà la version la plus récente, pas de mise à jour du fichier releases.json"
else
echo "mise à jour du fichier releases.json à la version $VERSION"
sed -i -E "s/\"latest\": .+,/\"latest\": \"$VERSION\",/" "$TMP_RELEASES_FILE"
echo -e "\t\"$VERSION\": {
\t\t\"darwin\": \"Cassiopée-${VERSION}-mac.zip\",
......
Markdown is supported
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