diff --git a/.gitignore b/.gitignore index 585f96a..d20f73d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ SteamAuth/SteamAuth/packages/ test_maFiles/ *.deb +*.tar.gz target/ aur/ diff --git a/scripts/check-aur.sh b/scripts/check-aur.sh new file mode 100755 index 0000000..c0c0d6a --- /dev/null +++ b/scripts/check-aur.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Performs a test install of the package from the AUR. If the package fails to install, there should be a non-zero exit code. +# Intended for use with CI. + +set -e + +cd scripts/docker/arch/ +tar -cvf arch-docker.tar.gz . +docker image build -t steamguard-cli-archlinux-builder - < arch-docker.tar.gz +rm arch-docker.tar.gz + +docker run -it --rm steamguard-cli-archlinux-builder /bin/bash -c "./install.sh steamguard-cli-git && steamguard-cli --version" + +docker image rm steamguard-cli-archlinux-builder:latest diff --git a/scripts/docker/arch/Dockerfile b/scripts/docker/arch/Dockerfile new file mode 100644 index 0000000..2813c1e --- /dev/null +++ b/scripts/docker/arch/Dockerfile @@ -0,0 +1,3 @@ +FROM greyltc/archlinux-aur:yay + +COPY install.sh /install.sh diff --git a/scripts/docker/arch/install.sh b/scripts/docker/arch/install.sh new file mode 100755 index 0000000..f5585dd --- /dev/null +++ b/scripts/docker/arch/install.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +PACKAGE="$1" +echo "Installing $PACKAGE" +sudo -u ab -D~ bash -c "yay -Syu --removemake --needed --noprogressbar --noconfirm $PACKAGE"