Compare commits
No commits in common. "69677727cb7c6b445c227d35dc130d72c6674a6b" and "f2776b34e3a1b97e6c45a62bfd80f4accd446268" have entirely different histories.
69677727cb
...
f2776b34e3
1 changed files with 7 additions and 14 deletions
|
|
@ -125,17 +125,13 @@ jobs:
|
||||||
# Extraction de la section [TAG]. On cherche la première ligne
|
# Extraction de la section [TAG]. On cherche la première ligne
|
||||||
# commençant par '## [' qui contient '[TAG]' (entre '## [' et
|
# commençant par '## [' qui contient '[TAG]' (entre '## [' et
|
||||||
# la prochaine ligne '## [' ou fin de fichier). awk en mode
|
# la prochaine ligne '## [' ou fin de fichier). awk en mode
|
||||||
# paragraphe suffit et reste POSIX. On garde aussi le titre
|
# paragraphe suffit et reste POSIX.
|
||||||
# (ligne `## [TAG] - channel`) pour la vérification du canal.
|
|
||||||
BODY=$(awk -v tag="[$TAG]" '
|
BODY=$(awk -v tag="[$TAG]" '
|
||||||
/^## \[/ {
|
/^## \[/ {
|
||||||
if (in_section) exit
|
if (in_section) exit
|
||||||
if (index($0, tag) > 0) {
|
if (index($0, tag) > 0) in_section=1
|
||||||
in_section=1
|
|
||||||
print
|
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
}
|
|
||||||
in_section { print }
|
in_section { print }
|
||||||
' CHANGELOG.md)
|
' CHANGELOG.md)
|
||||||
|
|
||||||
|
|
@ -147,16 +143,13 @@ jobs:
|
||||||
|
|
||||||
# Vérification cohérence du canal déclaré dans le suffixe.
|
# Vérification cohérence du canal déclaré dans le suffixe.
|
||||||
# Format attendu : "## [TAG] - stable" / "- preview" / "- unstable".
|
# Format attendu : "## [TAG] - stable" / "- preview" / "- unstable".
|
||||||
# On lit la première ligne du body qui contient le titre.
|
if [[ "$BODY" != *" - $CHANNEL"* ]]; then
|
||||||
TITLE=$(echo "$BODY" | head -1)
|
echo "::error::Section '## [$TAG]' must declare suffix '- $CHANNEL' to match tag parity."
|
||||||
if [[ "$TITLE" != *" - $CHANNEL"* ]]; then
|
echo "Current section body (first 5 lines):"
|
||||||
echo "::error::Section title '$TITLE' must declare suffix '- $CHANNEL' to match tag parity."
|
echo "$BODY" | head -5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Body pour la release : retire la première ligne (titre).
|
|
||||||
BODY=$(echo "$BODY" | tail -n +2)
|
|
||||||
|
|
||||||
echo "Section CHANGELOG validée pour [$TAG] - $CHANNEL"
|
echo "Section CHANGELOG validée pour [$TAG] - $CHANNEL"
|
||||||
|
|
||||||
# Expose channel + body pour les étapes suivantes via $GITHUB_ENV.
|
# Expose channel + body pour les étapes suivantes via $GITHUB_ENV.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue