Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

production-verify: Strip (Ubuntu) from nginx version.

Anders Kaseorgb926085168bf
diff --git a/tools/ci/production-verify b/tools/ci/production-verify
index ff840c2c03a..59ba559f4d3 100755
--- a/tools/ci/production-verify
+++ b/tools/ci/production-verify
@@ -41,6 +41,16 @@ while true; do
esac
done
+. /etc/os-release
+os_info="$(
+ . /etc/os-release
+ printf '%s\n' "$ID" "$VERSION_ID"
+)"
+{
+ read -r os_id
+ read -r os_version_id
+} <<<"$os_info"
+
cat >>/etc/zulip/settings.py <<EOF
# CircleCI override settings above
AUTHENTICATION_BACKENDS = ( 'zproject.backends.EmailAuthBackend', )
@@ -100,6 +110,13 @@ grep -vi -e '^content-length:' -e '^date:' -e '^expires:' -e '^set-cookie:' /tmp
nginx_version="$(nginx -v 2>&1)"
nginx_version="${nginx_version#nginx version: }"
+case "$os_id $os_version_id" in
+ 'ubuntu 22.04' | 'ubuntu 24.04')
+ ;;
+ *)
+ nginx_version="${nginx_version% (*)}"
+ ;;
+esac
success_header_file="/tmp/success-http-headers.template.txt"
check_header