mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
[CI:DOCS] Fix docs/version-check always requesting updates
As suggested by @edsantiago, the complex script and direct-link in the docs are adding little value while increasing the CI maintenance burden. Simply retire the script and strip the direct (versioned) links from the docs. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -275,8 +275,6 @@ function _run_altbuild() {
|
|||||||
*Windows*)
|
*Windows*)
|
||||||
make podman-remote-release-windows_amd64.zip
|
make podman-remote-release-windows_amd64.zip
|
||||||
make podman.msi
|
make podman.msi
|
||||||
# TODO: Script is broken, see #17620 for possible fix.
|
|
||||||
# docs/version-check
|
|
||||||
;;
|
;;
|
||||||
*Without*)
|
*Without*)
|
||||||
make build-no-cgo
|
make build-no-cgo
|
||||||
|
@ -16,8 +16,7 @@ The remote client uses a client-server model. You need Podman installed on a Lin
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
Installing the Windows Podman client begins by downloading the Podman Windows installer. The Windows installer is built with each Podman release and is downloadable from its [release description page](https://github.com/containers/podman/releases/latest). The Windows installer file is named `podman-#.#.#-setup.exe`, where the `#` symbols represent the version number of Podman.
|
Installing the Windows Podman client begins by downloading the Podman Windows installer. The Windows installer is built with each Podman release and is downloadable from its [release description page](https://github.com/containers/podman/releases/latest). The Windows installer file is named `podman-#.#.#-setup.exe`, where the `#` symbols represent the version number of Podman.
|
||||||
As of 2023-02-21 the latest version is [v4.4.1](https://github.com/containers/podman/releases/download/v4.4.1/podman-4.4.1-setup.exe).
|
|
||||||
|
|
||||||
Once you have downloaded the installer to your Windows host, simply double click the installer and Podman will be installed. The path is also set to put `podman` in the default user path.
|
Once you have downloaded the installer to your Windows host, simply double click the installer and Podman will be installed. The path is also set to put `podman` in the default user path.
|
||||||
|
|
||||||
|
@ -40,11 +40,9 @@ Installing Podman
|
|||||||
Installing the Windows Podman client begins by downloading the Podman Windows
|
Installing the Windows Podman client begins by downloading the Podman Windows
|
||||||
installer. The Windows installer is built with each Podman release and can be
|
installer. The Windows installer is built with each Podman release and can be
|
||||||
downloaded from the official
|
downloaded from the official
|
||||||
[Github release page](https://github.com/containers/podman/releases). The
|
[Github release page](https://github.com/containers/podman/releases).
|
||||||
Windows installer file is named podman-#.#.#-setup.exe, where the # symbols
|
Be sure to download a 4.1 or later release for the capabilities discussed
|
||||||
represent the version number of Podman. Be sure to download a 4.1 or later
|
in this guide.
|
||||||
release for the capabilities discussed in this guide.
|
|
||||||
As of 2023-02-21 the latest version is [v4.4.1](https://github.com/containers/podman/releases/download/v4.4.1/podman-4.4.1-setup.exe).
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -1,117 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# docs/version-check - cross-check that doc pages link to latest version
|
|
||||||
#
|
|
||||||
# As of 2022-11-10 this is only useful for Windows, but I think it'd be
|
|
||||||
# nice to be able to auto-update more pages with up-to-date links. If
|
|
||||||
# we do that, there are some exe assumptions that need to be cleaned up.
|
|
||||||
#
|
|
||||||
ME=$(basename $0)
|
|
||||||
|
|
||||||
URLBASE="https://github.com/containers/podman"
|
|
||||||
|
|
||||||
docfiles=(
|
|
||||||
docs/tutorials/mac_win_client.md
|
|
||||||
docs/tutorials/podman-for-windows.md
|
|
||||||
)
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
function warn() {
|
|
||||||
echo "$ME: $*" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -n "$CIRRUS_CI" ]]; then
|
|
||||||
|
|
||||||
# Setup check: exit gracefully unless we're in the desired environment
|
|
||||||
if [[ -n "$CIRRUS_PR" ]]; then
|
|
||||||
warn "we don't run on PRs"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$CIRRUS_CRON" != "main" ]]; then
|
|
||||||
warn "Only meaningful in CI when CIRRUS_CRON=main (it is '$CIRRUS_CRON')"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
# No sense running on release branches
|
|
||||||
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
||||||
if [[ "$current_branch" != "main" ]]; then
|
|
||||||
warn "only meaningful on 'main' (current branch is '$current_branch')"
|
|
||||||
if [[ ! -t 0 ]]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Okay. Fetch the highest-sorting tag. THIS MAY NOT BE THE SAME AS THE NEWEST!
|
|
||||||
LATEST=$(git ls-remote --tags --refs --sort="v:refname" "${URLBASE}.git" \
|
|
||||||
| sed 's/.*\///' \
|
|
||||||
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' \
|
|
||||||
| tail -n1)
|
|
||||||
|
|
||||||
echo LATEST=$LATEST
|
|
||||||
|
|
||||||
# The "#v" thing strips leading "v", because filename is numbers only
|
|
||||||
exe="${URLBASE}/releases/download/${LATEST}/podman-${LATEST#v}-setup.exe"
|
|
||||||
|
|
||||||
# EXE must exist. The convoluted {}||: is to handle errors gracefully
|
|
||||||
rc=
|
|
||||||
{
|
|
||||||
found=$(curl --head --silent -o /dev/null --write-out '%{http_code}' $exe)
|
|
||||||
rc=$?
|
|
||||||
} || :
|
|
||||||
|
|
||||||
if [[ $rc -ne 0 ]]; then
|
|
||||||
warn "FATAL: curl failed, rc=$rc, on $exe"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $found = 404 ]]; then
|
|
||||||
warn "FATAL: Windows EXE missing: $exe"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Expect 200 or 3xx; anything else is an error
|
|
||||||
if [[ ! $found =~ ^[23] ]]; then
|
|
||||||
warn "FATAL: Windows EXE: HTTP code $found on $exe"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cross-check all doc files for an up-to-date "latest version is" line.
|
|
||||||
fail=0
|
|
||||||
as_of='^As of .* the latest version is'
|
|
||||||
for md in ${docfiles[*]}; do
|
|
||||||
as_of_match=$(grep -E "$as_of" $md)
|
|
||||||
if [[ -z "$as_of_match" ]]; then
|
|
||||||
warn "$md does not have an 'As of ... the latest version is' line"
|
|
||||||
fail=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
md_latest=$(sed -ne 's;^.* version is \[\(.*\)\](.*;\1;' <<<"$as_of_match")
|
|
||||||
if [[ -n "$md_latest" ]]; then
|
|
||||||
warn "$md: No version found in '$as_of_match'"
|
|
||||||
fail=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$md_latest" != "$LATEST" ]]; then
|
|
||||||
warn "$md: needs updating."
|
|
||||||
# Running interactively? Do it.
|
|
||||||
if [[ -t 0 ]]; then
|
|
||||||
today=$(date --iso-8601=date)
|
|
||||||
sed -i "s;$as_of.*\$;As of $today the latest version is \[$LATEST\]\($exe\).;" $md
|
|
||||||
else
|
|
||||||
warn "Please run this script in an interactive shell, and I'll fix it."
|
|
||||||
fail=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $fail -ne 0 ]] && [[ -t 0 ]]; then
|
|
||||||
git status --untracked=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit $fail
|
|
Reference in New Issue
Block a user