mfc-candidates: Support GitHub mirror naming conventions
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run

GitHub repository mirrors are named freebsd-src and
freebsd-ports. Additionally, GitHub permits remote URLs with or
without the .git suffix.

Signed-off-by: Pat Maddox <pat@patmaddox.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1483
This commit is contained in:
Pat Maddox 2024-10-17 19:03:34 -07:00 committed by Ed Maste
parent e63d5726b4
commit 66a56e411c

View File

@ -33,14 +33,14 @@ from_branch=freebsd/main
author="${USER}"
# Get the FreeBSD repository
repo=$(basename "$(git remote get-url freebsd 2>/dev/null)" 2>/dev/null)
repo=$(basename "$(git remote get-url freebsd 2>/dev/null)" .git 2>/dev/null)
if [ "${repo}" = "ports.git" ]; then
if [ "${repo}" = "ports" -o "${repo}" = "freebsd-ports" ]; then
year=$(date '+%Y')
month=$(date '+%m')
qtr=$(((month-1) / 3 + 1))
to_branch="freebsd/${year}Q${qtr}"
elif [ "${repo}" = "src.git" ]; then
elif [ "${repo}" = "src" -o "${repo}" = "freebsd-src" ]; then
to_branch=freebsd/stable/14
# If pwd is a stable or release branch tree, default to it.
cur_branch=$(git symbolic-ref --short HEAD 2>/dev/null)