You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ykkzde_posy-cursors/.gitlab-ci.yml

50 lines
1.5 KiB

stages:
- package
Update-AUR:
image: archlinux/base
stage: package
only:
- /^v(\d+\.)*\d+$/
script:
- cd ./pkg/aur
- VERSION=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
# Update pkgver in PKBUILD
- echo "Updating PKGBUILDS with release information..."
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i posy-cursors/PKGBUILD
- echo "Installing Arch"
- pacman -Syu --noconfirm sudo base-devel openssh git openssl
# Build and update .SRCINFO
- cd posy-cursors/
- echo "makepkg"
- sudo -u nobody makepkg -c
- sudo -u nobody makepkg --printsrcinfo > .SRCINFO
- cd ..
# Configure SSH
- mkdir -p /root/.ssh
- cp ./aur.pub /root/.ssh/id_rsa.pub
- echo "${AUR_PRIVATE}" | base64 -d > /root/.ssh/id_rsa
- echo "Host aur.archlinux.org" >> /root/.ssh/config
- echo " IdentityFile /root/.ssh/aur" >> /root/.ssh/config
- echo " User aur" >> /root/.ssh/config
- chmod 600 /root/.ssh/{id_rsa*,config}
- eval `ssh-agent -s`
- echo -en "${SSH_PASSPHRASE}" | ssh-add /root/.ssh/id_rsa
- ssh-keyscan -H aur.archlinux.org >> /root/.ssh/known_hosts
- git config --global user.name "Dmitry Porunov"
- git config --global user.email "dmitry@ykkz.de"
# Clone, commit and push
- git clone ssh://aur@aur.archlinux.org/posy-cursors.git aur-posy-cursors
- cd aur-posy-cursors
- cp ../posy-cursors/{PKGBUILD,.SRCINFO} ./
- git add PKGBUILD .SRCINFO
- git commit -m "Release v$VERSION"
- git push
- cd ..