tests/sphinx-markdown-changelog: workaround for mawk

awk is mawk on Ubuntu.
This commit is contained in:
Johannes Altmanninger
2025-10-26 15:06:02 +01:00
parent ab39fab68c
commit 7c61fc5151
4 changed files with 49 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ version=$(sed 's,^fish \(\S*\) .*,\1,; 1q' "$workspace_root/CHANGELOG.rst")
previous_version=$(
cd "$workspace_root"
awk <CHANGELOG.rst '
( /^fish \S*\.\S*\.\S* \(released .*\)$/ &&
( /^fish [^ ]*\.[^ ]*\.[^ ]* \(released .*\)$/ &&
NR > 1 &&
# Skip tags that have not been created yet..
system("git rev-parse --verify >/dev/null --quiet refs/tags/"$2) == 0 \

View File

@@ -0,0 +1,45 @@
FROM ubuntu:latest
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
cmake ninja-build \
build-essential \
ca-certificates \
clang \
curl \
gettext \
git \
libpcre2-dev \
locales \
openssl \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN userdel ubuntu \
&& groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
-G sudo \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:1000 /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh \
&& sh /tmp/rustup.sh -y --no-modify-path
ENV PATH=/home/fishuser/.cargo/bin:$PATH
COPY fish_run_tests.sh /
ENV FISH_CHECK_LINT=false
CMD /fish_run_tests.sh

View File

@@ -37,8 +37,6 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh \
&& sh /tmp/rustup.sh -y --no-modify-path
ENV PATH=/home/fishuser/.cargo/bin:$PATH
RUN echo $PATH
COPY fish_run_tests.sh /
ENV FISH_CHECK_LINT=false

View File

@@ -1,6 +1,6 @@
#RUN: %fish %s
#REQUIRES: command -v sphinx-build
#REQUIRES: python -c 'import sphinx_markdown_builder'
#REQUIRES: python -c 'import sphinx_markdown_builder' || python3 -c 'import sphinx_markdown_builder'
set -l workspace_root (status dirname)/../..
if not test -e $workspace_root/.git
@@ -9,7 +9,8 @@ end
$workspace_root/build_tools/release-notes.sh -q >?relnotes.md
or {
echo "Failed to build Markdown release notes."
echo "Failed to build Markdown release notes, retrying with tracing"
sh -x $workspace_root/build_tools/release-notes.sh -q
return
}
sed -n 1p relnotes.md | grep -q '^## fish \S* (released .*)'