Compare commits
2 Commits
5a28cc9b52
...
1976a88e0b
Author | SHA1 | Date | |
---|---|---|---|
1976a88e0b | |||
e4b0c55cd8 |
10
maat
10
maat
@ -16,7 +16,7 @@ pkgExt=".pkg.tar.zst"
|
|||||||
deprivuser="maat"
|
deprivuser="maat"
|
||||||
|
|
||||||
### Printing defaults
|
### Printing defaults
|
||||||
passCell="<td style='color:green;'>PASS</td>";
|
passCell="<td style='color:#72ff72;'>PASS</td>";
|
||||||
failCell="<td style='color:red;'>FAIL</td>";
|
failCell="<td style='color:red;'>FAIL</td>";
|
||||||
warnCell="<td style='color:yellow;'>N/A</td>";
|
warnCell="<td style='color:yellow;'>N/A</td>";
|
||||||
tableHead="<table style='text-align: left;'>\n<tr><th>Package</th><th>Testing Status</th><th>Build Status</th><th>Latest Build</th><th>Time and Log of Run</th></tr>";
|
tableHead="<table style='text-align: left;'>\n<tr><th>Package</th><th>Testing Status</th><th>Build Status</th><th>Latest Build</th><th>Time and Log of Run</th></tr>";
|
||||||
@ -34,7 +34,7 @@ function Usage() {
|
|||||||
|
|
||||||
### Put the initial content in the webfile
|
### Put the initial content in the webfile
|
||||||
function SeedWebFile() {
|
function SeedWebFile() {
|
||||||
printf '<html>\n<head>\n<title>AniNIX/Maat -- Build Results</title>\n<link rel="icon" type="image/png" href="/MaatIcon.png" />\n<link rel="icon" type="image/png" href="/MaatIcon.png">\n<meta name="apple-mobile-web-app-capable" content="yes" />\n<link rel="stylesheet" type="text/css" href="https://aninix.net/assets/css/theme-aninix.css">\n<link rel="apple-touch-icon" sizes="180x180" href="/MaatIcon.png" />\n</head>\n<body>\n<h1>AniNIX/Maat -- Build Status</h1>\nWEBSTATSGOHERE\n<h2>AnINIX Packages</h2>\n<p>These are packages written by the AniNIX. Their source is in <a href="https://aninix.net/" alt=AniNIX/Foundation>AniNIX/Foundation</a>.</p>\n' > "$webfile"
|
printf '<html lang="en">\n<head>\n<title>AniNIX/Maat -- Build Results</title>\n<link rel="icon" type="image/png" href="/MaatIcon.png" />\n<link rel="icon" type="image/png" href="/MaatIcon.png">\n<meta name="apple-mobile-web-app-capable" content="yes" />\n<link rel="stylesheet" type="text/css" href="https://aninix.net/assets/css/theme-aninix.css">\n<link rel="apple-touch-icon" sizes="180x180" href="/MaatIcon.png" />\n</head>\n<body>\n<h1>AniNIX/Maat -- Build Status</h1>\nWEBSTATSGOHERE\n<h2>AnINIX Packages</h2>\n<p>These are packages written by the AniNIX. Their source is in <a href="https://aninix.net/" alt=AniNIX/Foundation>AniNIX/Foundation</a>.</p>\n' > "$webfile"
|
||||||
printf "$tableHead" >> "$webfile"
|
printf "$tableHead" >> "$webfile"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ function BuildPackage() {
|
|||||||
for pkg in `find . -type f | grep -E "${pkgExt}""\$"`; do
|
for pkg in `find . -type f | grep -E "${pkgExt}""\$"`; do
|
||||||
printf "<a href=\"/$suffix/$pkg\">$pkg</a><br/>" >> "$webfile"
|
printf "<a href=\"/$suffix/$pkg\">$pkg</a><br/>" >> "$webfile"
|
||||||
pkgname="$(basename "$pkg" | cut -f 1 -d '.' | sed 's/-[[:digit:]]\+$//')"
|
pkgname="$(basename "$pkg" | cut -f 1 -d '.' | sed 's/-[[:digit:]]\+$//')"
|
||||||
|
# Remove old copies
|
||||||
find "${pkgdir}/${suffix}/" -name "${pkgname}-[0-9]*" -exec rm {} \;
|
find "${pkgdir}/${suffix}/" -name "${pkgname}-[0-9]*" -exec rm {} \;
|
||||||
mv "$pkg" "$pkgdir"/"$suffix";
|
mv "$pkg" "$pkgdir"/"$suffix";
|
||||||
mv "$pkg"".sig" "$pkgdir"/"$suffix";
|
mv "$pkg"".sig" "$pkgdir"/"$suffix";
|
||||||
@ -95,11 +96,11 @@ function BuildRepo() {
|
|||||||
for pkgbuild in `find . -type f -name PKGBUILD`; do
|
for pkgbuild in `find . -type f -name PKGBUILD`; do
|
||||||
cd "$(dirname "$pkgbuild")"
|
cd "$(dirname "$pkgbuild")"
|
||||||
# Tell the status file about it.
|
# Tell the status file about it.
|
||||||
printf '<tr style="border: 1px solid #FFF;"><td>'"<a href='$repo'>$repodir</a> -- $pkgbuild"'</td>' >> "$webfile"
|
printf '<tr style="border: 1px solid #FFF;"><td>'"<a href='$(echo "$repo" | sed 's#aur.archlinux.org#aur.archlinux.org/packages#' | sed 's/.git//')'>$repodir</a> -- $pkgbuild"'</td>' >> "$webfile"
|
||||||
if [ -f Makefile ] && [ `grep -E -c '^test:' Makefile` -ge 1 ]; then
|
if [ -f Makefile ] && [ `grep -E -c '^test:' Makefile` -ge 1 ]; then
|
||||||
# Have to try to install dependencies first
|
# Have to try to install dependencies first
|
||||||
for dep in $(grep makedepends PKGBUILD | cut -f 2 -d '(' | cut -f 1 -d ')' | sed "s/'//g"); do
|
for dep in $(grep makedepends PKGBUILD | cut -f 2 -d '(' | cut -f 1 -d ')' | sed "s/'//g"); do
|
||||||
pacman -Sy "$dep" --noconfirm --needed
|
pacman -S "$dep" --noconfirm --needed
|
||||||
done
|
done
|
||||||
# Check test status.
|
# Check test status.
|
||||||
timeout --preserve-status "$timeout" sudo -u "$deprivuser" /bin/bash -l -c "cd $PWD; make test" &>> "$pkgdir"/"$repodir".txt
|
timeout --preserve-status "$timeout" sudo -u "$deprivuser" /bin/bash -l -c "cd $PWD; make test" &>> "$pkgdir"/"$repodir".txt
|
||||||
@ -129,7 +130,6 @@ function UpdateLocalRepo() {
|
|||||||
set -x
|
set -x
|
||||||
cd "$pkgdir"
|
cd "$pkgdir"
|
||||||
chown -R "$deprivuser": .
|
chown -R "$deprivuser": .
|
||||||
# TODO Add deduplication of updated files -- keep latest 3 versions.
|
|
||||||
rm -Rf AniNIX.[db,files]*
|
rm -Rf AniNIX.[db,files]*
|
||||||
sudo -u "$deprivuser" repo-add --sign ./AniNIX.db.tar.zst `ls -1 *"${pkgExt}"`
|
sudo -u "$deprivuser" repo-add --sign ./AniNIX.db.tar.zst `ls -1 *"${pkgExt}"`
|
||||||
cd aur/
|
cd aur/
|
||||||
|
Loading…
Reference in New Issue
Block a user