Skip to content

Commit

Permalink
Fix deployment to AUR.
Browse files Browse the repository at this point in the history
  • Loading branch information
funilrys committed Mar 5, 2022
1 parent 824afd9 commit d73c097
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,8 @@ jobs:

- name: Install dependencies
run: |
curl -LO "https://repo.archlinuxcn.org/x86_64/${patched_glibc}" && \
bsdtar -C / -xvf "$patched_glibc" && \
rm ${patched_glibc} && \
pacman -Syu --needed --noconfirm && \
pacman -S --needed --noconfirm git binutils pacman-contrib openssh rsync python python-setuptools jq
env:
patched_glibc: glibc-linux4-2.33-4-x86_64.pkg.tar.zst
- uses: actions/checkout@v2
name: Clone repository
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,8 @@ jobs:

- name: Install dependencies
run: |
mkdir -p /var/lib/pacman/
pacman -Syu --noconfirm
pacman -S --needed --noconfirm git binutils pacman-contrib openssh rsync python python-setuptools
pacman -Syu --needed --noconfirm && \
pacman -S --needed --noconfirm git binutils pacman-contrib openssh rsync python python-setuptools jq
- uses: actions/checkout@v2
name: Clone repository
Expand All @@ -286,6 +285,15 @@ jobs:
latest=$(python3 setup.py --version)
if [[ $(python3 setup.py --name) == "PyFunceble-dev" ]]
then
licenseURL="https://raw.githubusercontent.com/funilrys/PyFunceble/dev/LICENSE"
newURL=$(curl -s https://pypi.org/pypi/PyFunceble-dev/json | jq -r ".releases.\"${latest}\"[] | select(.filename | strings | test(\".tar\")).url")
else
licenseURL="https://raw.githubusercontent.com/funilrys/PyFunceble/master/LICENSE"
newURL=$(curl -s https://pypi.org/pypi/PyFunceble/json | jq -r ".releases.\"${latest}\"[] | select(.filename | strings | test(\".tar\")).url")
fi
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ secrets.GIT_EMAIL }}
git clone ssh://aur@aur.archlinux.org/pyfunceble.git ${aurRepoDir}
Expand All @@ -299,13 +307,12 @@ jobs:
echo "Previous version: ${current}"
echo "New version: ${latest}"
[[ "${current}" == "${latest}" ]] && exit 0
useradd makepkg
chown makepkg:root . -R
sed "/^pkgver=/s/.*/pkgver=${latest}/" -i PKGBUILD
sed "/^pkgrel=/s/.*/pkgrel=1/" -i PKGBUILD
sed "s,^source=(.*),source=('${newURL}' '${licenseURL}')," -i PKGBUILD
su makepkg -c "updpkgsums"
su makepkg -c "makepkg --printsrcinfo" > .SRCINFO
Expand Down

0 comments on commit d73c097

Please sign in to comment.