generated from archlinux/template
Compare commits
No commits in common. "a38331404079fe68dae977647a176f5632fb386f" and "bc8dfc2e886a22d14c78ddcc0120c1e48e2d3671" have entirely different histories.
a383314040
...
bc8dfc2e88
@ -1,47 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Exit on any error
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Source the PKGBUILD in a subshell to avoid polluting the global environment
|
|
||||||
(
|
|
||||||
source ./PKGBUILD
|
|
||||||
|
|
||||||
# Convert pkgname to array in case it's a single string
|
|
||||||
pkgnames=("${pkgname[@]}")
|
|
||||||
|
|
||||||
for pkg in "${pkgnames[@]}"; do
|
|
||||||
echo "Checking package: $pkg"
|
|
||||||
|
|
||||||
if pacman -Si "$pkg" &>/dev/null; then
|
|
||||||
echo "Package '$pkg' exists in a repository."
|
|
||||||
|
|
||||||
# Get the package build date
|
|
||||||
pkg_build_date=$(date -d "$(pacman -Si "$pkg" | grep 'Build Date' | cut -d: -f2-)" +%s)
|
|
||||||
|
|
||||||
all_deps=("${depends[@]}" "${makedepends[@]}" "${optdepends[@]}")
|
|
||||||
|
|
||||||
# Check each dependency
|
|
||||||
for dep in "${all_deps[@]}"; do
|
|
||||||
dep_name=$(echo "$dep" | sed 's/[<>=].*//') # Remove version constraints
|
|
||||||
echo "Querying dependency: $dep_name"
|
|
||||||
|
|
||||||
if pacman -Si "$dep_name" &>/dev/null; then
|
|
||||||
dep_build_date=$(date -d "$(pacman -Si "$dep_name" | grep 'Build Date' | cut -d: -f2-)" +%s)
|
|
||||||
if (( dep_build_date >= pkg_build_date )); then
|
|
||||||
echo "Dependency '$dep_name' has newer or equal build date than '$pkg'."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Dependency '$dep_name' not found in repositories. Skipping."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All dependencies are older than package '$pkg'."
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "Package '$pkg' does NOT exist in any repository."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
)
|
|
@ -22,11 +22,11 @@ jobs:
|
|||||||
- name: Fetch AUR
|
- name: Fetch AUR
|
||||||
run: git fetch aur
|
run: git fetch aur
|
||||||
|
|
||||||
- name: Merge latest changes
|
- name: Rebase current changes
|
||||||
run: git merge aur/master
|
run: git rebase aur/master
|
||||||
|
|
||||||
- name: Push changes (if any)
|
- name: Push changes (if any)
|
||||||
run: git push origin master
|
run: git push -f origin master
|
||||||
|
|
||||||
wake:
|
wake:
|
||||||
name: Wake Runner
|
name: Wake Runner
|
||||||
@ -37,37 +37,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
curl https://idlesleep.wolproxy.seeseepuff.be/status
|
curl https://idlesleep.wolproxy.seeseepuff.be/status
|
||||||
|
|
||||||
check:
|
|
||||||
name: Check if rebuild is necessary
|
|
||||||
runs-on: ubuntu-amd64
|
|
||||||
needs: wake
|
|
||||||
outputs:
|
|
||||||
up-to-date: ${{ steps.up-to-date.outputs.up-to-date }}
|
|
||||||
container:
|
|
||||||
image: gitea.seeseepuff.be/archlinux/archlinux:latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Ensure image is up-to-date
|
|
||||||
run: |
|
|
||||||
sudo pacman -Sy --noconfirm
|
|
||||||
|
|
||||||
- name: Check if rebuild is necessary
|
|
||||||
id: up-to-date
|
|
||||||
run: |
|
|
||||||
set +e
|
|
||||||
.gitea/workflows/up-to-date.sh
|
|
||||||
echo "exit_code=$?" >> "$GITHUB_OUTPUT"
|
|
||||||
set -e
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build and Push
|
name: Build and Push
|
||||||
runs-on: ubuntu-amd64
|
runs-on: ubuntu-amd64
|
||||||
needs: check
|
needs: wake
|
||||||
container:
|
container:
|
||||||
image: gitea.seeseepuff.be/archlinux/archlinux:latest
|
image: gitea.seeseepuff.be/archlinux/archlinux:latest
|
||||||
if: needs.check.outputs.up-to-date == '1'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -76,10 +51,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo pacman -Syu --noconfirm
|
sudo pacman -Syu --noconfirm
|
||||||
|
|
||||||
- name: Check if rebuild is necessary
|
|
||||||
run: |
|
|
||||||
.gitea/workflows/up-to-date.sh
|
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: |
|
run: |
|
||||||
makepkg -s --noconfirm -
|
makepkg -s --noconfirm -
|
||||||
|
3
PKGBUILD
3
PKGBUILD
@ -15,8 +15,7 @@ optdepends=(
|
|||||||
'sudo: privilege elevation'
|
'sudo: privilege elevation'
|
||||||
'doas: privilege elevation'
|
'doas: privilege elevation'
|
||||||
)
|
)
|
||||||
makedepends=('go>=1.21'
|
makedepends=('go>=1.21')
|
||||||
'helloworld')
|
|
||||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Jguer/yay/archive/v${pkgver}.tar.gz")
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Jguer/yay/archive/v${pkgver}.tar.gz")
|
||||||
sha256sums=('f3f4af5d84f75abc3ea726f192568bdf570e2632b4b3c214effa4bba406ad293')
|
sha256sums=('f3f4af5d84f75abc3ea726f192568bdf570e2632b4b3c214effa4bba406ad293')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user