mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-26 08:17:17 +00:00
Compare commits
8 Commits
b7eef41b39
...
a1281989f3
Author | SHA1 | Date | |
---|---|---|---|
a1281989f3 | |||
440d7785d2 | |||
3d97490c11 | |||
89d8227ba6 | |||
fca9239cd2 | |||
be57045972 | |||
6fe77eb465 | |||
7c6c24a46d |
2
.github/workflows/setup.sh
vendored
2
.github/workflows/setup.sh
vendored
@ -30,7 +30,7 @@ mv dist/ahriman-*.tar.gz package/archlinux
|
||||
chmod +777 package/archlinux # because fuck you that's why
|
||||
cd package/archlinux
|
||||
sudo -u nobody -- makepkg -cf --skipchecksums --noconfirm
|
||||
sudo -u nobody -- makepkg --packagelist | grep -v -- -debug- | pacman -U --noconfirm -
|
||||
sudo -u nobody -- makepkg --packagelist | grep -v -- -debug- | pacman -U --noconfirm --nodeps -
|
||||
# create machine-id which is required by build tools
|
||||
systemd-machine-id-setup
|
||||
|
||||
|
@ -79,7 +79,8 @@ RUN cd "/home/build/ahriman" && \
|
||||
tox -e archive && \
|
||||
cp ./dist/*.tar.gz "package/archlinux" && \
|
||||
cd "package/archlinux" && \
|
||||
runuser -u build -- makepkg --noconfirm --install --skipchecksums && \
|
||||
runuser -u build -- makepkg --noconfirm --skipchecksums && \
|
||||
runuser -u build -- makepkg --packagelist | grep -v -- -debug- | pacman -U --noconfirm --nodeps - && \
|
||||
cd / && rm -r "/home/build/ahriman"
|
||||
|
||||
# cleanup unused
|
||||
|
@ -65,7 +65,7 @@ package_ahriman-triggers() {
|
||||
package_ahriman-web() {
|
||||
pkgname='ahriman-web'
|
||||
pkgdesc="ArcH linux ReposItory MANager, web server"
|
||||
depends=("$pkgbase=$pkgver" 'python-aiohttp-apispec-git' 'python-aiohttp-cors' 'python-aiohttp-jinja2')
|
||||
depends=("$pkgbase=$pkgver" 'python-aiohttp-apispec>=3.0.0' 'python-aiohttp-cors' 'python-aiohttp-jinja2')
|
||||
optdepends=('python-aioauth-client: OAuth2 authorization support'
|
||||
'python-aiohttp-security: authorization support'
|
||||
'python-aiohttp-session: authorization support'
|
||||
|
@ -54,10 +54,10 @@ class ConfigurationMultiDict(dict[str, Any]):
|
||||
value(Any): value of the related key
|
||||
|
||||
Raises:
|
||||
OptionError: if the key already exists in the dictionary, but not a single value list
|
||||
OptionError: if the key already exists in the dictionary, but not a single value list or a string
|
||||
"""
|
||||
match self.get(key):
|
||||
case [current_value]:
|
||||
case [current_value] | str(current_value): # type: ignore[misc]
|
||||
value = f"{current_value} {value}"
|
||||
case None:
|
||||
pass
|
||||
|
@ -29,6 +29,7 @@ prefix = Path(sys.prefix).relative_to("/")
|
||||
site_packages = Path(site.getsitepackages()[0]).relative_to("/")
|
||||
SUBPACKAGES = {
|
||||
"ahriman": [
|
||||
prefix / "bin",
|
||||
prefix / "lib" / "systemd",
|
||||
prefix / "share",
|
||||
site_packages / "ahriman",
|
||||
|
@ -40,9 +40,9 @@ def test_setitem_array_exception() -> None:
|
||||
must raise exception if the current value is not a single value array
|
||||
"""
|
||||
instance = ConfigurationMultiDict()
|
||||
instance["key[]"] = "value1"
|
||||
instance["key[]"] = ["value1", "value2"]
|
||||
with pytest.raises(OptionError):
|
||||
instance["key[]"] = ["value2"]
|
||||
instance["key[]"] = ["value3"]
|
||||
|
||||
|
||||
def test_setitem_exception() -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user