mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
tests/sphinx-markdown-changelog: work around shallow clones in CI
GitHub CI uses shallow clones where no Git tags available, which breaks tests/checks/sphinx-markdown-changelog.fish. Somehow tests/checks/sphinx-markdown-changelog.fish doesn't seem to have run CI before the next commit (or perhaps the python3 change from commit "tests/sphinx-markdown-changelog: workaround for mawk", 2025-10-26?). Anway, to prevent failure, disable that part of this test in CI for now; the point of the test is mostly to check the RST->Markdown conversion and syntax.
This commit is contained in:
@@ -12,17 +12,20 @@ mkdir -p "$relnotes_tmp/fake-workspace" "$relnotes_tmp/out"
|
||||
)
|
||||
version=$(sed 's,^fish \(\S*\) .*,\1,; 1q' "$workspace_root/CHANGELOG.rst")
|
||||
add_stats=false
|
||||
previous_version=$(
|
||||
cd "$workspace_root"
|
||||
git for-each-ref --format='%(objecttype) %(refname:strip=2)' refs/tags |
|
||||
awk '/tag/ {print $2}' | sort --version-sort |
|
||||
grep -vF "$(git describe)" | tail -1
|
||||
)
|
||||
minor_version=${version%.*}
|
||||
previous_minor_version=${previous_version%.*}
|
||||
if [ "$minor_version" != "$previous_minor_version" ]; then
|
||||
add_stats=true
|
||||
fi
|
||||
# Skip on shallow clone (CI) for now.
|
||||
if test -z "$CI" || git -C "$workspace_root" tag | grep -q .; then {
|
||||
previous_version=$(
|
||||
cd "$workspace_root"
|
||||
git for-each-ref --format='%(objecttype) %(refname:strip=2)' refs/tags |
|
||||
awk '/tag/ {print $2}' | sort --version-sort |
|
||||
grep -vF "$(git describe)" | tail -1
|
||||
)
|
||||
minor_version=${version%.*}
|
||||
previous_minor_version=${previous_version%.*}
|
||||
if [ "$minor_version" != "$previous_minor_version" ]; then
|
||||
add_stats=true
|
||||
fi
|
||||
} fi
|
||||
{
|
||||
sed -n 1,2p <"$workspace_root/CHANGELOG.rst"
|
||||
if $add_stats; then {
|
||||
|
||||
Reference in New Issue
Block a user