mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-17 12:06:47 +01:00
CI: fix shell syntax (for-loop 2>/dev/null), key-files grep (BRANCH_NAME + cyberpanel_upgrade.sh)
This commit is contained in:
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -56,7 +56,8 @@ jobs:
|
||||
for f in preUpgrade.sh cyberpanel_upgrade.sh plogical/upgrade.py install/install.py plogical/versionFetcher.py; do
|
||||
test -f "$f" || { echo "Missing: $f"; exit 1; }
|
||||
done
|
||||
grep -q 'download_install_phpmyadmin\|Branch_Name' preUpgrade.sh || exit 1
|
||||
grep -q 'BRANCH_NAME' preUpgrade.sh || exit 1
|
||||
grep -q 'Branch_Name\|download_install_phpmyadmin\|Branch_Check' cyberpanel_upgrade.sh || exit 1
|
||||
echo "Key files OK"
|
||||
|
||||
# Run validation inside a container per supported OS (AlmaLinux, CentOS, CloudLinux, Debian, RHEL, Rocky, Ubuntu).
|
||||
@@ -143,6 +144,6 @@ jobs:
|
||||
for f in preUpgrade.sh cyberpanel_upgrade.sh plogical/upgrade.py install/install.py plogical/versionFetcher.py; do
|
||||
test -f "$f" || { echo "Missing: $f"; exit 1; }
|
||||
done
|
||||
grep -q "Branch_Name\|download_install_phpmyadmin\|cyberpanel" preUpgrade.sh || exit 1
|
||||
grep -q "BRANCH_NAME" preUpgrade.sh && grep -q "Branch_Name\|download_install_phpmyadmin\|Branch_Check" cyberpanel_upgrade.sh || exit 1
|
||||
echo "Done."
|
||||
'
|
||||
|
||||
@@ -450,7 +450,7 @@ if [[ "$Server_OS" = "CentOS" ]] || [[ "$Server_OS" = "AlmaLinux9" ]] ; then
|
||||
ALMA_VER="${Server_OS_Version:-9}"
|
||||
ARCH="x86_64"
|
||||
ALMA_BASE="https://repo.almalinux.org/almalinux/${ALMA_VER}"
|
||||
for repo in /etc/yum.repos.d/almalinux*.repo /etc/yum.repos.d/AlmaLinux*.repo 2>/dev/null; do
|
||||
for repo in /etc/yum.repos.d/almalinux*.repo /etc/yum.repos.d/AlmaLinux*.repo; do
|
||||
[[ ! -f "$repo" ]] && continue
|
||||
if grep -q '^mirrorlist=' "$repo" 2>/dev/null; then
|
||||
sed -i 's|^mirrorlist=|#mirrorlist=|g' "$repo"
|
||||
@@ -459,7 +459,7 @@ if [[ "$Server_OS" = "CentOS" ]] || [[ "$Server_OS" = "AlmaLinux9" ]] ; then
|
||||
fi
|
||||
done
|
||||
# Ensure appstream/baseos have explicit baseurl; support [appstream], [almalinux-appstream], etc.
|
||||
for repofile in /etc/yum.repos.d/almalinux.repo /etc/yum.repos.d/almalinux*.repo /etc/yum.repos.d/AlmaLinux*.repo 2>/dev/null; do
|
||||
for repofile in /etc/yum.repos.d/almalinux.repo /etc/yum.repos.d/almalinux*.repo /etc/yum.repos.d/AlmaLinux*.repo; do
|
||||
[[ ! -f "$repofile" ]] && continue
|
||||
for section in appstream almalinux-appstream AppStream; do
|
||||
if grep -q "^\[${section}\]" "$repofile" 2>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user