initial commit
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
askiiart 2024-10-02 10:16:47 -05:00
commit d1e91c1995
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30
2 changed files with 39 additions and 0 deletions

17
.drone.yml Normal file
View file

@ -0,0 +1,17 @@
kind: pipeline
type: docker
name: default
steps:
- name: Update repo
image: archlinux
commands:
- '/drone/src/build.sh'
volumes:
- name: isos
path: /iso
volumes:
- name: isos
host:
path: /mnt/user/files/repos/archlinux/iso/

22
build.sh Normal file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
pacman -Sy archiso git --noconfirm
git clone https://git.blendos.co/blendOS/image-builder.git
cd image-builder
sudo mkarchiso -v -w workdir/ -o out/ .
cd ./out/
filename=$(find . -mindepth 1 -maxdepth 1 -name "blendOS-*.iso")
date=${filename%-*}
date=${date#*-}
mkdir /iso/$date/
cp -r $filename /iso/$date/
cd /iso/
num=$(find . -mindepth 1 -maxdepth 1 -name 'blendOS-*' -type d | wc -l)
echo $num
if [ $(($num - 3)) -ge 1 ]; then
rm -rf $(find . -mindepth 1 -maxdepth 1 -name 'blendOS-*' -type d | tail -n $(($num - 3)))
fi
ln -sf /iso/latest/ $(find . -mindepth 1 -maxdepth 1 -name 'blendOS-*' -type d | head -n 1)