Skip to content

Commit

Permalink
test.sh: Switch from SVN to Git
Browse files Browse the repository at this point in the history
  • Loading branch information
hack3ric authored and felixonmars committed May 25, 2023
1 parent 25eec18 commit d7dfa2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
container: archlinux/archlinux:latest
steps:
- name: Install dependencies
run: pacman -Syu --noconfirm devtools patch binutils sudo
run: pacman -Syu --noconfirm devtools patch binutils sudo expac
- name: Fix git unsafe repository
run: git config --global --add safe.directory /__w/archriscv-packages/archriscv-packages
- uses: actions/checkout@v3
Expand Down
21 changes: 7 additions & 14 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ for _dir in $(git diff --merge-base --name-only upstream/master | cut -d / -f 1
cd $_tmp

PKGBASE=$_dir
sudo -u nobody svn checkout svn://svn.archlinux.org/packages/$PKGBASE || \
sudo -u nobody svn checkout svn://svn.archlinux.org/community/$PKGBASE || continue
sudo -u nobody git clone https://gitlab.archlinux.org/archlinux/packaging/packages/$PKGBASE.git || continue
cd $PKGBASE

cd $PKGBASE/trunk

PKGNAME=$(. PKGBUILD; echo $pkgname)
for _REPO in core extra community; do
PKGNAME=$(. PKGBUILD >/dev/null; echo $pkgname)
for _REPO in core extra; do
if pacman -Sql $_REPO | grep "^$PKGNAME$" >/dev/null; then
REPO=$_REPO
break
Expand All @@ -40,13 +38,9 @@ for _dir in $(git diff --merge-base --name-only upstream/master | cut -d / -f 1
exit 1
fi

ARCH=$(. PKGBUILD; echo $arch)

if [ "${ARCH}" == "any" ] && ! cd ../repos/$REPO-any; then
error "Release directory does not exist for $REPO-any."
exit 1
elif [ "${ARCH}" != "any" ] && ! cd ../repos/$REPO-x86_64; then
error "Release directory does not exist for $REPO-x86_64."
LATEST_VERSION=$(expac -S %v $PKGNAME)
if ! sudo -u nobody git checkout ${LATEST_VERSION/:/-}; then
error "Repository does not contain tag of latest non-testing version $LATEST_VERSION."
exit 1
fi

Expand All @@ -58,4 +52,3 @@ for _dir in $(git diff --merge-base --name-only upstream/master | cut -d / -f 1

popd
done

0 comments on commit d7dfa2f

Please sign in to comment.