Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d803a58ab8 | |||
| 7bd8bf4d85 | |||
| a7e72f273f | |||
| b926b303c5 | |||
| d14ccdf939 | |||
| 259f439101 | |||
| 1f454fa656 | |||
| 18c0e27da4 | |||
| d34b41b899 | |||
| 9fe86c4114 | |||
| 3b5ff4cf41 | |||
| 7b51f818d7 | |||
| 5a16695338 | |||
| a5c77c1440 | |||
| a6d35036f3 | |||
| abceb07c1a | |||
| 2c71563efc | |||
| f39ce0977f |
@@ -5,7 +5,7 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths: [ docker/*, docker/scripts/* ]
|
paths: [ docker/** ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths: [ docker/* ]
|
paths: [ docker/* ]
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
FROM archlinux/archlinux:base-devel
|
FROM archlinux/archlinux:base-devel
|
||||||
|
|
||||||
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
||||||
COPY scripts/pacman.conf.arch/* /scripts/pacman.conf/
|
COPY scripts/pacman.conf.arch/pacman.conf.pl /scripts/pacman.conf.pl
|
||||||
|
|
||||||
ARG MIRROR=https://mirror.sanin.dev/arch-linux/\$repo/os/\$arch
|
ARG BUILDMIRROR=https://mirror.sanin.dev/arch-linux/\$repo/os/\$arch
|
||||||
|
|
||||||
RUN sed -i "1iServer = $MIRROR" /etc/pacman.d/mirrorlist && \
|
RUN cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak && \
|
||||||
|
sed -i "1iServer = $BUILDMIRROR" /etc/pacman.d/mirrorlist && \
|
||||||
pacman -Syu --noconfirm git clang sudo devtools vim bash-completion && \
|
pacman -Syu --noconfirm git clang sudo devtools vim bash-completion && \
|
||||||
|
pacman -Scc --noconfirm && \
|
||||||
|
rm -rf /var/lib/pacman/sync /var/cache/pacman/pkg && \
|
||||||
|
mv /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist && \
|
||||||
git config --global init.defaultBranch "master" && \
|
git config --global init.defaultBranch "master" && \
|
||||||
chmod +x /scripts/* && \
|
chmod +x /scripts/* && \
|
||||||
useradd -m user && \
|
useradd -m user && \
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
FROM artixlinux/artixlinux:base-devel
|
FROM artixlinux/artixlinux:base-devel
|
||||||
|
|
||||||
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
||||||
COPY scripts/pacman.conf.artix/* /scripts/pacman.conf/
|
COPY scripts/pacman.conf.artix/pacman.conf.pl /scripts/pacman.conf.pl
|
||||||
|
|
||||||
ARG MIRROR=https://mirror.sanin.dev/artix-linux/\$repo/os/\$arch
|
ARG BUILDMIRROR=https://mirror.sanin.dev/artix-linux/\$repo/os/\$arch
|
||||||
|
|
||||||
RUN sed -i "1iServer = $MIRROR" /etc/pacman.d/mirrorlist && \
|
RUN cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak && \
|
||||||
|
sed -i "1iServer = $BUILDMIRROR" /etc/pacman.d/mirrorlist && \
|
||||||
pacman -Syu --noconfirm git clang sudo vim glibc openssh bash-completion && \
|
pacman -Syu --noconfirm git clang sudo vim glibc openssh bash-completion && \
|
||||||
|
pacman -Scc --noconfirm && \
|
||||||
|
rm -rf /var/lib/pacman/sync /var/cache/pacman/pkg && \
|
||||||
|
mv /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist && \
|
||||||
git config --global init.defaultBranch "master" && \
|
git config --global init.defaultBranch "master" && \
|
||||||
chmod +x /scripts/* && \
|
chmod +x /scripts/* && \
|
||||||
useradd -m user && \
|
useradd -m user && \
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -n "$DEP" ] && [ "$DEP" != "stable" ]
|
/scripts/pacman.conf.pl | sudo tee "/etc/pacman.conf" > /dev/null
|
||||||
|
|
||||||
|
if [ -n "$MIRROR" ]
|
||||||
then
|
then
|
||||||
sudo cp "/scripts/pacman.conf/pacman.$DEP.conf" "/etc/pacman.conf" && \
|
sudo sed -i "1iServer = $MIRROR" /etc/pacman.d/mirrorlist
|
||||||
sudo pacman -Syu --noconfirm --noprogressbar
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$REPO" ]
|
if [ -z "$REPO" ]
|
||||||
then
|
then
|
||||||
/bin/bash
|
/bin/bash
|
||||||
exit $?;
|
exit $?;
|
||||||
|
else
|
||||||
|
sudo pacman -Syu --noconfirm --noprogressbar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
checkoutCommit() {
|
checkoutCommit() {
|
||||||
@@ -27,6 +31,21 @@ applyPatch() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
postEntrypoint() {
|
||||||
|
if [ -n "$POST" ] && [ -x "./post-entrypoint.sh" ] ; then
|
||||||
|
echo "EXECUTING POSTENTRY"
|
||||||
|
./post-entrypoint.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
doBuild() {
|
||||||
|
if [ -n "$POST" ] && [ -x "./post-entrypoint.sh" ] ; then
|
||||||
|
makepkg -smf --noconfirm --noprogressbar --skippgpcheck
|
||||||
|
else
|
||||||
|
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
changeDir() {
|
changeDir() {
|
||||||
if [ -n "$CD" ]
|
if [ -n "$CD" ]
|
||||||
then
|
then
|
||||||
@@ -34,11 +53,15 @@ changeDir() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clone the git repo
|
DIR="${WORKSPACE:-/home/user/pkg}"
|
||||||
git clone "$REPO" /home/user/pkg && \
|
|
||||||
cd /home/user/pkg && \
|
if [ ! -d "$DIR" ]; then
|
||||||
|
git clone "$REPO" "$DIR" || exit $?
|
||||||
|
fi
|
||||||
|
cd "$DIR" && \
|
||||||
checkoutCommit && \
|
checkoutCommit && \
|
||||||
applyPatch && \
|
applyPatch && \
|
||||||
sudo pacman -Syu --noconfirm --noprogressbar &&\
|
sudo pacman -Syu --noconfirm --noprogressbar &&\
|
||||||
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive
|
doBuild && \
|
||||||
|
postEntrypoint
|
||||||
exit $?;
|
exit $?;
|
||||||
|
|||||||
50
docker/scripts/pacman.conf.arch/pacman.staging.conf → docker/scripts/pacman.conf.arch/pacman.conf.pl
Normal file → Executable file
50
docker/scripts/pacman.conf.arch/pacman.staging.conf → docker/scripts/pacman.conf.arch/pacman.conf.pl
Normal file → Executable file
@@ -1,3 +1,12 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $dep = $ENV{DEP} // 'stable';
|
||||||
|
my $tier = $ENV{TIER} // '2';
|
||||||
|
|
||||||
|
#region header
|
||||||
|
print <<'EOHEADER';
|
||||||
#
|
#
|
||||||
# /etc/pacman.conf
|
# /etc/pacman.conf
|
||||||
#
|
#
|
||||||
@@ -12,24 +21,61 @@ DownloadUser = alpm
|
|||||||
SigLevel = Required DatabaseOptional
|
SigLevel = Required DatabaseOptional
|
||||||
LocalFileSigLevel = Optional
|
LocalFileSigLevel = Optional
|
||||||
|
|
||||||
|
EOHEADER
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region core
|
||||||
|
if ($dep eq 'staging') {
|
||||||
|
print <<'EOCORESTAGING';
|
||||||
[core-staging]
|
[core-staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOCORESTAGING
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||||
|
print <<'EOCORETESTING';
|
||||||
[core-testing]
|
[core-testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOCORETESTING
|
||||||
|
}
|
||||||
|
|
||||||
|
print <<'EOCORE';
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOCORE
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region extra
|
||||||
|
if ($tier ne '0') {
|
||||||
|
if ($dep eq 'staging') {
|
||||||
|
print <<'EOEXTRASTAGING';
|
||||||
[extra-staging]
|
[extra-staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOEXTRASTAGING
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||||
|
print <<'EOEXTRATESTING';
|
||||||
[extra-testing]
|
[extra-testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOEXTRATESTING
|
||||||
|
}
|
||||||
|
|
||||||
|
print <<'EOEXTRA';
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOEXTRA
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region options
|
||||||
|
print <<'EOOPTIONS';
|
||||||
[options]
|
[options]
|
||||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
||||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||||
@@ -42,4 +88,6 @@ NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/
|
|||||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
||||||
NoExtract = usr/share/man/* usr/share/info/*
|
NoExtract = usr/share/man/* usr/share/info/*
|
||||||
NoExtract = usr/share/vim/vim*/lang/*
|
NoExtract = usr/share/vim/vim*/lang/*
|
||||||
NoExtract = etc/pacman.conf etc/pacman.d/mirrorlist
|
NoExtract = etc/pacman.conf etc/pacman.d/mirrorlist
|
||||||
|
EOOPTIONS
|
||||||
|
#endregion
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#
|
|
||||||
# /etc/pacman.conf
|
|
||||||
#
|
|
||||||
|
|
||||||
[options]
|
|
||||||
HoldPkg = pacman glibc
|
|
||||||
Architecture = auto
|
|
||||||
NoProgressBar
|
|
||||||
VerbosePkgLists
|
|
||||||
ParallelDownloads = 5
|
|
||||||
DownloadUser = alpm
|
|
||||||
SigLevel = Required DatabaseOptional
|
|
||||||
LocalFileSigLevel = Optional
|
|
||||||
|
|
||||||
|
|
||||||
[core-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[core]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[options]
|
|
||||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
|
||||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
|
||||||
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/*
|
|
||||||
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
|
|
||||||
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*
|
|
||||||
NoExtract = !usr/share/*locales/trans*
|
|
||||||
NoExtract = !usr/share/X11/locale/C/*
|
|
||||||
NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/*
|
|
||||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
|
||||||
NoExtract = usr/share/man/* usr/share/info/*
|
|
||||||
NoExtract = usr/share/vim/vim*/lang/*
|
|
||||||
NoExtract = etc/pacman.conf etc/pacman.d/mirrorlist
|
|
||||||
67
docker/scripts/pacman.conf.artix/pacman.staging.conf → docker/scripts/pacman.conf.artix/pacman.conf.pl
Normal file → Executable file
67
docker/scripts/pacman.conf.artix/pacman.staging.conf → docker/scripts/pacman.conf.artix/pacman.conf.pl
Normal file → Executable file
@@ -1,3 +1,12 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $dep = $ENV{DEP} // 'stable';
|
||||||
|
my $tier = $ENV{TIER} // '2';
|
||||||
|
|
||||||
|
#region header
|
||||||
|
print <<'EOHEADER';
|
||||||
#
|
#
|
||||||
# /etc/pacman.conf
|
# /etc/pacman.conf
|
||||||
#
|
#
|
||||||
@@ -12,33 +21,87 @@ DownloadUser = alpm
|
|||||||
SigLevel = Required DatabaseOptional
|
SigLevel = Required DatabaseOptional
|
||||||
LocalFileSigLevel = Optional
|
LocalFileSigLevel = Optional
|
||||||
|
|
||||||
|
EOHEADER
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region system
|
||||||
|
if ($dep eq 'staging') {
|
||||||
|
print <<'EOSYSTEMSTAGING';
|
||||||
[system-goblins]
|
[system-goblins]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOSYSTEMSTAGING
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||||
|
print <<'EOSYSTEMTESTING';
|
||||||
[system-gremlins]
|
[system-gremlins]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOSYSTEMTESTING
|
||||||
|
}
|
||||||
|
|
||||||
|
print <<'EOSYSTEM';
|
||||||
[system]
|
[system]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOSYSTEM
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region world
|
||||||
|
if ($tier ne '0') {
|
||||||
|
if ($dep eq 'staging') {
|
||||||
|
print <<'EOWORLDSTAGING';
|
||||||
[world-goblins]
|
[world-goblins]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOWORLDSTAGING
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||||
|
print <<'EOWORLDTESTING';
|
||||||
[world-gremlins]
|
[world-gremlins]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOWORLDTESTING
|
||||||
|
}
|
||||||
|
|
||||||
|
print <<'EOWORLD';
|
||||||
[world]
|
[world]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOWORLD
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region galaxy
|
||||||
|
if ($tier eq '2') {
|
||||||
|
if ($dep eq 'staging') {
|
||||||
|
print <<'EOGALAXYSTAGING';
|
||||||
[galaxy-goblins]
|
[galaxy-goblins]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOGALAXYSTAGING
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||||
|
print <<'EOGALAXYTESTING';
|
||||||
[galaxy-gremlins]
|
[galaxy-gremlins]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOGALAXYTESTING
|
||||||
|
}
|
||||||
|
|
||||||
|
print <<'EOGALAXY';
|
||||||
[galaxy]
|
[galaxy]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
EOGALAXY
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region options
|
||||||
|
print <<'EOOPTIONS';
|
||||||
[options]
|
[options]
|
||||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
||||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||||
@@ -50,4 +113,6 @@ NoExtract = !usr/share/X11/locale/C/*
|
|||||||
NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/*
|
NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/*
|
||||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
||||||
NoExtract = usr/share/man/* usr/share/info/*
|
NoExtract = usr/share/man/* usr/share/info/*
|
||||||
NoExtract = usr/share/vim/vim*/lang/*
|
NoExtract = usr/share/vim/vim*/lang/*
|
||||||
|
EOOPTIONS
|
||||||
|
#endregion
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
#
|
|
||||||
# /etc/pacman.conf
|
|
||||||
#
|
|
||||||
|
|
||||||
[options]
|
|
||||||
HoldPkg = pacman glibc
|
|
||||||
Architecture = auto
|
|
||||||
NoProgressBar
|
|
||||||
VerbosePkgLists
|
|
||||||
ParallelDownloads = 5
|
|
||||||
DownloadUser = alpm
|
|
||||||
SigLevel = Required DatabaseOptional
|
|
||||||
LocalFileSigLevel = Optional
|
|
||||||
|
|
||||||
[system-gremlins]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[system]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[world-gremlins]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[world]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[galaxy-gremlins]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[galaxy]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[options]
|
|
||||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
|
||||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
|
||||||
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/*
|
|
||||||
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
|
|
||||||
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*
|
|
||||||
NoExtract = !usr/share/*locales/trans*
|
|
||||||
NoExtract = !usr/share/X11/locale/C/*
|
|
||||||
NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/*
|
|
||||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
|
||||||
NoExtract = usr/share/man/* usr/share/info/*
|
|
||||||
NoExtract = usr/share/vim/vim*/lang/*
|
|
||||||
128
package-lock.json
generated
128
package-lock.json
generated
@@ -1,20 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "archery",
|
"name": "archery",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "archery",
|
"name": "archery",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^2.2.0",
|
"body-parser": "^2.2.1",
|
||||||
"ejs": "3.1.10",
|
"ejs": "3.1.10",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"express-session": "1.18.2",
|
"express-session": "1.18.2",
|
||||||
"express-ws": "^5.0.2",
|
"express-ws": "^5.0.2",
|
||||||
"ky": "1.10.0",
|
"ky": "1.14.0",
|
||||||
"passport": "0.7.0",
|
"passport": "0.7.0",
|
||||||
"passport-openidconnect": "0.1.2",
|
"passport-openidconnect": "0.1.2",
|
||||||
"pg": "^8.16.3",
|
"pg": "^8.16.3",
|
||||||
@@ -23,16 +23,16 @@
|
|||||||
"sqids": "0.3.0"
|
"sqids": "0.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "^5.0.3",
|
"@types/express": "^5.0.5",
|
||||||
"@types/express-session": "^1.18.2",
|
"@types/express-session": "^1.18.2",
|
||||||
"@types/express-ws": "3.0.5",
|
"@types/express-ws": "3.0.6",
|
||||||
"@types/node": "^24.5.2",
|
"@types/node": "^24.10.1",
|
||||||
"@types/passport": "1.0.17",
|
"@types/passport": "1.0.17",
|
||||||
"@types/passport-openidconnect": "0.1.3",
|
"@types/passport-openidconnect": "0.1.3",
|
||||||
"forking-build-shit": "1.0.4"
|
"forking-build-shit": "1.0.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@parcel/watcher": {
|
"node_modules/@parcel/watcher": {
|
||||||
@@ -376,15 +376,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/express": {
|
"node_modules/@types/express": {
|
||||||
"version": "5.0.3",
|
"version": "5.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.5.tgz",
|
||||||
"integrity": "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==",
|
"integrity": "sha512-LuIQOcb6UmnF7C1PCFmEU1u2hmiHL43fgFQX67sN3H4Z+0Yk0Neo++mFsBjhOAuLzvlQeqAAkeDOZrJs9rzumQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/body-parser": "*",
|
"@types/body-parser": "*",
|
||||||
"@types/express-serve-static-core": "^5.0.0",
|
"@types/express-serve-static-core": "^5.0.0",
|
||||||
"@types/serve-static": "*"
|
"@types/serve-static": "^1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/express-serve-static-core": {
|
"node_modules/@types/express-serve-static-core": {
|
||||||
@@ -411,9 +411,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/express-ws": {
|
"node_modules/@types/express-ws": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/express-ws/-/express-ws-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express-ws/-/express-ws-3.0.6.tgz",
|
||||||
"integrity": "sha512-lbWMjoHrm/v85j81UCmb/GNZFO3genxRYBW1Ob7rjRI+zxUBR+4tcFuOpKKsYQ1LYTYiy3356epLeYi/5zxUwA==",
|
"integrity": "sha512-6ZDt+tMEQgM4RC1sMX1fIO7kHQkfUDlWfxoPddXUeeDjmc+Yt/fCzqXfp8rFahNr5eIxdomrWphLEWDkB2q3UQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -443,12 +443,12 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.5.2",
|
"version": "24.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz",
|
||||||
"integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==",
|
"integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.12.0"
|
"undici-types": "~7.16.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/oauth": {
|
"node_modules/@types/oauth": {
|
||||||
@@ -589,23 +589,27 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/body-parser": {
|
"node_modules/body-parser": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
|
||||||
"integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==",
|
"integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bytes": "^3.1.2",
|
"bytes": "^3.1.2",
|
||||||
"content-type": "^1.0.5",
|
"content-type": "^1.0.5",
|
||||||
"debug": "^4.4.0",
|
"debug": "^4.4.3",
|
||||||
"http-errors": "^2.0.0",
|
"http-errors": "^2.0.0",
|
||||||
"iconv-lite": "^0.6.3",
|
"iconv-lite": "^0.7.0",
|
||||||
"on-finished": "^2.4.1",
|
"on-finished": "^2.4.1",
|
||||||
"qs": "^6.14.0",
|
"qs": "^6.14.0",
|
||||||
"raw-body": "^3.0.0",
|
"raw-body": "^3.0.1",
|
||||||
"type-is": "^2.0.0"
|
"type-is": "^2.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
@@ -1097,14 +1101,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/forking-build-shit": {
|
"node_modules/forking-build-shit": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/forking-build-shit/-/forking-build-shit-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/forking-build-shit/-/forking-build-shit-1.0.5.tgz",
|
||||||
"integrity": "sha512-pknWCgvJWSkP30sMllWzFxJhjFtXCRuILgYT1N7pJLAyI/SXQ0RXyhTcg+hjCnKaH4aVpxWUFUF2afwTDRO6RA==",
|
"integrity": "sha512-b9HVQF1f2qXkgB+yTJe3U2kLfggvbUZjU1aqljI0E8O+sxo+cQH/HsyMGdHNPaUoMgSe/qfOsL6CPumu0jrrdg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"csso": "5.0.5",
|
"csso": "5.0.5",
|
||||||
"sass": "1.90.0",
|
"sass": "1.93.2",
|
||||||
"uglify-js": "3.19.3"
|
"uglify-js": "3.19.3"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -1238,21 +1242,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/iconv-lite": {
|
"node_modules/iconv-lite": {
|
||||||
"version": "0.6.3",
|
"version": "0.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz",
|
||||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
"integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/immutable": {
|
"node_modules/immutable": {
|
||||||
"version": "5.1.3",
|
"version": "5.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz",
|
||||||
"integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==",
|
"integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
@@ -1341,9 +1349,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ky": {
|
"node_modules/ky": {
|
||||||
"version": "1.10.0",
|
"version": "1.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/ky/-/ky-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/ky/-/ky-1.14.0.tgz",
|
||||||
"integrity": "sha512-YRPCzHEWZffbfvmRrfwa+5nwBHwZuYiTrfDX0wuhGBPV0pA/zCqcOq93MDssON/baIkpYbvehIX5aLpMxrRhaA==",
|
"integrity": "sha512-Rczb6FMM6JT0lvrOlP5WUOCB7s9XKxzwgErzhKlKde1bEV90FXplV1o87fpt4PU/asJFiqjYJxAJyzJhcrxOsQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -1817,22 +1825,6 @@
|
|||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/raw-body/node_modules/iconv-lite": {
|
|
||||||
"version": "0.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz",
|
|
||||||
"integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/express"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/readdirp": {
|
"node_modules/readdirp": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
||||||
@@ -1896,9 +1888,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/sass": {
|
"node_modules/sass": {
|
||||||
"version": "1.90.0",
|
"version": "1.93.2",
|
||||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.90.0.tgz",
|
"resolved": "https://registry.npmjs.org/sass/-/sass-1.93.2.tgz",
|
||||||
"integrity": "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==",
|
"integrity": "sha512-t+YPtOQHpGW1QWsh1CHQ5cPIr9lbbGZLZnbihP/D/qZj/yuV68m8qarcV17nvkOX81BCrvzAlq2klCQFZghyTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -2204,9 +2196,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.7.3",
|
"version": "5.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||||
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -2249,9 +2241,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "7.12.0",
|
"version": "7.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
||||||
"integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==",
|
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/unpipe": {
|
"node_modules/unpipe": {
|
||||||
@@ -2282,9 +2274,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/validator": {
|
"node_modules/validator": {
|
||||||
"version": "13.12.0",
|
"version": "13.15.20",
|
||||||
"resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/validator/-/validator-13.15.20.tgz",
|
||||||
"integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==",
|
"integrity": "sha512-KxPOq3V2LmfQPP4eqf3Mq/zrT0Dqp2Vmx2Bn285LwVahLc+CsxOM0crBHczm8ijlcjZ0Q5Xd6LW3z3odTPnlrw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -1,31 +1,31 @@
|
|||||||
{
|
{
|
||||||
"name": "archery",
|
"name": "archery",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"description": "Build Arch packages through a web interface",
|
"description": "Build Arch packages through a web interface",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"docker",
|
"docker",
|
||||||
"arch",
|
"arch",
|
||||||
"artix"
|
"artix"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/CorySanin/archery#readme",
|
"homepage": "https://git.sanin.dev/corysanin/archery#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/CorySanin/archery/issues"
|
"url": "https://github.com/CorySanin/archery/issues"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/CorySanin/archery.git"
|
"url": "git+https://git.sanin.dev/corysanin/archery.git"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Cory Sanin",
|
"author": "Cory Sanin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^2.2.0",
|
"body-parser": "^2.2.1",
|
||||||
"ejs": "3.1.10",
|
"ejs": "3.1.10",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"express-session": "1.18.2",
|
"express-session": "1.18.2",
|
||||||
"express-ws": "^5.0.2",
|
"express-ws": "^5.0.2",
|
||||||
"ky": "1.10.0",
|
"ky": "1.14.0",
|
||||||
"passport": "0.7.0",
|
"passport": "0.7.0",
|
||||||
"passport-openidconnect": "0.1.2",
|
"passport-openidconnect": "0.1.2",
|
||||||
"pg": "^8.16.3",
|
"pg": "^8.16.3",
|
||||||
@@ -34,16 +34,16 @@
|
|||||||
"sqids": "0.3.0"
|
"sqids": "0.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "^5.0.3",
|
"@types/express": "^5.0.5",
|
||||||
"@types/express-session": "^1.18.2",
|
"@types/express-session": "^1.18.2",
|
||||||
"@types/express-ws": "3.0.5",
|
"@types/express-ws": "3.0.6",
|
||||||
"@types/node": "^24.5.2",
|
"@types/node": "^24.10.1",
|
||||||
"@types/passport": "1.0.17",
|
"@types/passport": "1.0.17",
|
||||||
"@types/passport-openidconnect": "0.1.3",
|
"@types/passport-openidconnect": "0.1.3",
|
||||||
"forking-build-shit": "1.0.4"
|
"forking-build-shit": "1.0.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.9.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npx build-shit",
|
"build": "npx build-shit",
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
for (let btn of document.getElementsByClassName('copybtn')) {
|
|
||||||
btn.addEventListener('click', e => {
|
|
||||||
navigator.clipboard.writeText(e.target.previousElementSibling.innerText);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
23
scripts/form.js
Normal file
23
scripts/form.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
for (let btn of document.getElementsByClassName('copybtn')) {
|
||||||
|
btn.addEventListener('click', e => {
|
||||||
|
navigator.clipboard.writeText(e.target.previousElementSibling.innerText);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('persistChk')?.addEventListener('change', async e => {
|
||||||
|
const sqid = document.getElementById('sqid').textContent;
|
||||||
|
const persist = !!e.target?.checked;
|
||||||
|
const resp = await fetch(`/build/${sqid}/persist`, {
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({ persist })
|
||||||
|
});
|
||||||
|
if (!resp.ok) {
|
||||||
|
this.location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -15,6 +15,11 @@ interface BuildEvent {
|
|||||||
message: any;
|
message: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ControllerConfig {
|
||||||
|
"arch-mirror"?: string;
|
||||||
|
"artix-mirror"?: string;
|
||||||
|
}
|
||||||
|
|
||||||
function getContainerName(id: number) {
|
function getContainerName(id: number) {
|
||||||
return `archery-build-${id}`;
|
return `archery-build-${id}`;
|
||||||
}
|
}
|
||||||
@@ -24,9 +29,11 @@ class BuildController extends EventEmitter {
|
|||||||
private running: boolean = false;
|
private running: boolean = false;
|
||||||
private interval: NodeJS.Timeout;
|
private interval: NodeJS.Timeout;
|
||||||
private cancelled: boolean = false;
|
private cancelled: boolean = false;
|
||||||
|
private config: ControllerConfig;
|
||||||
|
|
||||||
constructor(config = {}) {
|
constructor(config: ControllerConfig = {}) {
|
||||||
super();
|
super();
|
||||||
|
this.config = config;
|
||||||
// this.interval = setInterval(this.triggerBuild, 60000);
|
// this.interval = setInterval(this.triggerBuild, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +91,7 @@ class BuildController extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private build = async (build: Build) => {
|
private build = async (build: Build) => {
|
||||||
return new Promise<void>((resolve, reject) => {
|
return new Promise<void>((resolve, _) => {
|
||||||
const docker = spawn.spawn('docker', this.createBuildParams(build));
|
const docker = spawn.spawn('docker', this.createBuildParams(build));
|
||||||
docker.on('spawn', () => {
|
docker.on('spawn', () => {
|
||||||
const remainder = {
|
const remainder = {
|
||||||
@@ -129,6 +136,7 @@ class BuildController extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private createBuildParams = (build: Build) => {
|
private createBuildParams = (build: Build) => {
|
||||||
|
const customMirror = this.config?.[`${build.distro}-mirror`];
|
||||||
const params = ['run', '--rm', '-e', `REPO=${build.repo}`];
|
const params = ['run', '--rm', '-e', `REPO=${build.repo}`];
|
||||||
if (build.dependencies) {
|
if (build.dependencies) {
|
||||||
params.push('-e', `DEP=${build.dependencies}`);
|
params.push('-e', `DEP=${build.dependencies}`);
|
||||||
@@ -139,6 +147,9 @@ class BuildController extends EventEmitter {
|
|||||||
if (build.patch) {
|
if (build.patch) {
|
||||||
params.push('-e', `PATCH=${build.patch}`);
|
params.push('-e', `PATCH=${build.patch}`);
|
||||||
}
|
}
|
||||||
|
if (customMirror && typeof customMirror === 'string' && customMirror.length > 0) {
|
||||||
|
params.push('-e', `MIRROR=${customMirror}`);
|
||||||
|
}
|
||||||
params.push('--name', getContainerName(build.id));
|
params.push('--name', getContainerName(build.id));
|
||||||
params.push(docker_images[build.distro]);
|
params.push(docker_images[build.distro]);
|
||||||
return params;
|
return params;
|
||||||
@@ -188,4 +199,4 @@ class BuildController extends EventEmitter {
|
|||||||
|
|
||||||
export default BuildController;
|
export default BuildController;
|
||||||
export { BuildController };
|
export { BuildController };
|
||||||
export type { BuildEvent, LogType };
|
export type { BuildEvent, LogType, ControllerConfig };
|
||||||
27
src/DB.ts
27
src/DB.ts
@@ -30,6 +30,7 @@ interface Build {
|
|||||||
pid?: number;
|
pid?: number;
|
||||||
sqid?: string;
|
sqid?: string;
|
||||||
uuid: string;
|
uuid: string;
|
||||||
|
persist: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface User {
|
interface User {
|
||||||
@@ -128,6 +129,10 @@ class DB extends Store {
|
|||||||
uuid: {
|
uuid: {
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
unique: true
|
unique: true
|
||||||
|
},
|
||||||
|
persist: {
|
||||||
|
type: DataTypes.BOOLEAN,
|
||||||
|
defaultValue: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -216,6 +221,15 @@ class DB extends Store {
|
|||||||
return user.id;
|
return user.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async upsertUser(user: User): Promise<string> {
|
||||||
|
await this.user.upsert({
|
||||||
|
id: user.id,
|
||||||
|
username: user.username,
|
||||||
|
displayName: user.displayName || null
|
||||||
|
});
|
||||||
|
return user.id;
|
||||||
|
}
|
||||||
|
|
||||||
public async createBuild(repo: string, commit: string, patch: string, distro: string, dependencies: string, author: string, uuid: string): Promise<number> {
|
public async createBuild(repo: string, commit: string, patch: string, distro: string, dependencies: string, author: string, uuid: string): Promise<number> {
|
||||||
const buildRec = await this.build.create({
|
const buildRec = await this.build.create({
|
||||||
repo,
|
repo,
|
||||||
@@ -253,6 +267,16 @@ class DB extends Store {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async persist(id: number, persist: boolean = true): Promise<void> {
|
||||||
|
await this.build.update({
|
||||||
|
persist
|
||||||
|
}, {
|
||||||
|
where: {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public async appendLog(buildId: number, type: LogType, chunk: string): Promise<void> {
|
public async appendLog(buildId: number, type: LogType, chunk: string): Promise<void> {
|
||||||
await this.logChunk.create({
|
await this.logChunk.create({
|
||||||
buildId,
|
buildId,
|
||||||
@@ -357,7 +381,8 @@ class DB extends Store {
|
|||||||
public async cleanup(): Promise<void> {
|
public async cleanup(): Promise<void> {
|
||||||
await this.build.destroy({
|
await this.build.destroy({
|
||||||
where: {
|
where: {
|
||||||
startTime: { [Op.lt]: new Date(Date.now() - MONTH * 6) }
|
startTime: { [Op.lt]: new Date(Date.now() - MONTH * 6) },
|
||||||
|
persist: { [Op.eq]: false }
|
||||||
},
|
},
|
||||||
force: true
|
force: true
|
||||||
});
|
});
|
||||||
|
|||||||
19
src/Web.ts
19
src/Web.ts
@@ -297,6 +297,17 @@ class Web {
|
|||||||
res.redirect(`/build/${req.params.id}/`);
|
res.redirect(`/build/${req.params.id}/`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.post('/build/:id/persist', async (req, res) => {
|
||||||
|
const build = await this.db.getBuild(sqids.decode(req.params.id)?.[0]);
|
||||||
|
const persist = !! req?.body?.persist;
|
||||||
|
if (!build) {
|
||||||
|
res.sendStatus(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await this.db.persist(build.id, persist);
|
||||||
|
res.sendStatus(200);
|
||||||
|
})
|
||||||
|
|
||||||
this._webserver = this.app.listen(this.port, () => console.log(`archery is running on port ${this.port}`));
|
this._webserver = this.app.listen(this.port, () => console.log(`archery is running on port ${this.port}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,17 +335,15 @@ class Web {
|
|||||||
userInfoURL: openidconf.userinfo_endpoint,
|
userInfoURL: openidconf.userinfo_endpoint,
|
||||||
clientID: options.oidc.clientId,
|
clientID: options.oidc.clientId,
|
||||||
clientSecret: options.oidc.clientSecret,
|
clientSecret: options.oidc.clientSecret,
|
||||||
callbackURL: `${baseUrl}cb`
|
callbackURL: `${baseUrl}cb`,
|
||||||
|
scope: 'profile'
|
||||||
}, async (_: string, profile: passport.Profile, cb: OpenIDConnectStrategy.VerifyCallback) => {
|
}, async (_: string, profile: passport.Profile, cb: OpenIDConnectStrategy.VerifyCallback) => {
|
||||||
const userObj: User = {
|
const userObj: User = {
|
||||||
id: profile.id,
|
id: profile.id,
|
||||||
username: profile.username,
|
username: profile.username,
|
||||||
displayName: profile.displayName
|
displayName: profile.displayName
|
||||||
};
|
};
|
||||||
const user = await this.db.getUser(profile.id);
|
await this.db.upsertUser(userObj);
|
||||||
if (!user) {
|
|
||||||
await this.db.createUser(userObj);
|
|
||||||
}
|
|
||||||
return cb(null, userObj);
|
return cb(null, userObj);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,16 +5,18 @@ import { DB } from './DB.ts';
|
|||||||
import { BuildController } from './BuildController.ts';
|
import { BuildController } from './BuildController.ts';
|
||||||
import type { WebConfig } from './Web.ts';
|
import type { WebConfig } from './Web.ts';
|
||||||
import type { DBConfig } from './DB.ts';
|
import type { DBConfig } from './DB.ts';
|
||||||
|
import type { ControllerConfig } from './BuildController.ts';
|
||||||
|
|
||||||
interface compositeConfig {
|
interface compositeConfig {
|
||||||
web?: WebConfig,
|
web?: WebConfig,
|
||||||
db?: DBConfig
|
db?: DBConfig,
|
||||||
|
controller?: ControllerConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
const config: compositeConfig = JSON.parse(await fs.promises.readFile(process.env.config || process.env.CONFIG || path.join(process.cwd(), 'config', 'config.json'), 'utf-8'));
|
const config: compositeConfig = JSON.parse(await fs.promises.readFile(process.env.config || process.env.CONFIG || path.join(process.cwd(), 'config', 'config.json'), 'utf-8'));
|
||||||
|
|
||||||
const web = new Web(config.web);
|
const web = new Web(config.web);
|
||||||
const buildController = new BuildController();
|
const buildController = new BuildController(config.controller);
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1500));
|
await new Promise((resolve) => setTimeout(resolve, 1500));
|
||||||
const db = new DB(config.db);
|
const db = new DB(config.db);
|
||||||
web.setDB(db);
|
web.setDB(db);
|
||||||
|
|||||||
@@ -268,6 +268,10 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.display-none {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
#followCheckmarkContainer {
|
#followCheckmarkContainer {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>Build #<%= build.id %></h1>
|
<h1>Build #<%= build.id %></h1>
|
||||||
<h2 id="buildStatus"><%= build.status %></h2>
|
<h2 id="buildStatus"><%= build.status %></h2>
|
||||||
|
<% if (!public) { %>
|
||||||
|
<h3 id="sqid" class="display-none"><%= build.sqid %></h3>
|
||||||
|
<% } %>
|
||||||
<div class="overflow-x">
|
<div class="overflow-x">
|
||||||
<div class="grid-2col">
|
<div class="grid-2col">
|
||||||
<label>Repo</label> <span><span><%= build.repo %></span> <button class="copybtn">Copy</button></span>
|
<label>Repo</label> <span><span><%= build.repo %></span> <button class="copybtn">Copy</button></span>
|
||||||
@@ -21,6 +24,9 @@
|
|||||||
<% if (build.userId && build.userId !== '-1') { %>
|
<% if (build.userId && build.userId !== '-1') { %>
|
||||||
<label>Triggered by</label> <span><%= build.user.displayName %> (<%= build.user.username %>)</span>
|
<label>Triggered by</label> <span><%= build.user.displayName %> (<%= build.user.username %>)</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if (!public) { %>
|
||||||
|
<label>Persist</label> <span><input id="persistChk" type="checkbox" <% if (build.persist) { %>checked<% } %>/></span>
|
||||||
|
<% } %>
|
||||||
<% if (locals.shareable) { %>
|
<% if (locals.shareable) { %>
|
||||||
<label>Shareable link</label> <span><a href="<%= shareable %>"><%= shareable %></a> <button class="copybtn">Copy</button></span>
|
<label>Shareable link</label> <span><a href="<%= shareable %>"><%= shareable %></a> <button class="copybtn">Copy</button></span>
|
||||||
<% } %>
|
<% } %>
|
||||||
@@ -31,7 +37,7 @@
|
|||||||
<a href="/build?id=<%= build.sqid %>" class="button">Clone</a>
|
<a href="/build?id=<%= build.sqid %>" class="button">Clone</a>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (!ended) { %>
|
<% if (!ended && !public) { %>
|
||||||
<div id="cancelRow">
|
<div id="cancelRow">
|
||||||
<a href="cancel" class="button">Cancel build</a>
|
<a href="cancel" class="button">Cancel build</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<%- include("footer", locals) %>
|
<%- include("footer", locals) %>
|
||||||
<script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script>
|
<script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script>
|
||||||
<script src="/assets/js/copy.js?v1" nonce="<%= cspNonce %>"></script>
|
<script src="/assets/js/form.js?v1" nonce="<%= cspNonce %>"></script>
|
||||||
<% if (!ended) { %>
|
<% if (!ended) { %>
|
||||||
<script src="/assets/js/build.js?v3" nonce="<%= cspNonce %>"></script>
|
<script src="/assets/js/build.js?v3" nonce="<%= cspNonce %>"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<link rel="canonical" href="<%= page.canonical%>"/>
|
<link rel="canonical" href="<%= page.canonical%>"/>
|
||||||
<% } %>
|
<% } %>
|
||||||
<link rel="shortcut icon" href="/assets/svg/favicon.svg">
|
<link rel="shortcut icon" href="/assets/svg/favicon.svg">
|
||||||
<link rel="stylesheet" href="/assets/css/styles.css?v4">
|
<link rel="stylesheet" href="/assets/css/styles.css?v5">
|
||||||
<script nonce="<%= cspNonce %>">
|
<script nonce="<%= cspNonce %>">
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
document.body.classList.remove('preload');
|
document.body.classList.remove('preload');
|
||||||
|
|||||||
Reference in New Issue
Block a user