2019-10-31 22:18:59 +00:00
|
|
|
stages:
|
|
|
|
- package
|
|
|
|
|
2020-06-24 17:25:30 +00:00
|
|
|
Update-AUR:
|
2019-10-31 22:13:37 +00:00
|
|
|
image: archlinux/base
|
|
|
|
stage: package
|
|
|
|
only:
|
|
|
|
- /^v(\d+\.)*\d+$/
|
|
|
|
script:
|
|
|
|
- cd ./pkg/aur
|
|
|
|
|
2020-06-24 17:58:35 +00:00
|
|
|
- VERSION=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
|
2019-10-31 22:13:37 +00:00
|
|
|
|
2020-06-24 18:07:11 +00:00
|
|
|
# Update pkgver in PKBUILD
|
2019-10-31 22:13:37 +00:00
|
|
|
- echo "Updating PKGBUILDS with release information..."
|
2020-06-24 17:54:28 +00:00
|
|
|
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i posy-cursors/PKGBUILD
|
2019-10-31 22:13:37 +00:00
|
|
|
|
2019-11-01 00:27:37 +00:00
|
|
|
- echo "Installing Arch"
|
2019-10-31 22:13:37 +00:00
|
|
|
- pacman -Syu --noconfirm sudo base-devel openssh git openssl
|
|
|
|
|
2020-06-24 18:07:11 +00:00
|
|
|
# Build and update .SRCINFO
|
2019-10-31 22:13:37 +00:00
|
|
|
- cd posy-cursors/
|
2019-11-01 00:27:37 +00:00
|
|
|
- echo "makepkg"
|
2019-10-31 22:13:37 +00:00
|
|
|
- sudo -u nobody makepkg -c
|
|
|
|
- sudo -u nobody makepkg --printsrcinfo > .SRCINFO
|
2019-10-31 23:10:05 +00:00
|
|
|
- cd ..
|
2019-10-31 22:13:37 +00:00
|
|
|
|
2019-11-01 01:23:35 +00:00
|
|
|
# Configure SSH
|
2019-10-31 22:13:37 +00:00
|
|
|
- mkdir -p /root/.ssh
|
|
|
|
- cp ./aur.pub /root/.ssh/id_rsa.pub
|
2020-06-24 17:25:30 +00:00
|
|
|
- echo "${AUR_PRIVATE}" | base64 -d > /root/.ssh/id_rsa
|
2019-10-31 22:13:37 +00:00
|
|
|
- echo "Host aur.archlinux.org" >> /root/.ssh/config
|
|
|
|
- echo " IdentityFile /root/.ssh/aur" >> /root/.ssh/config
|
|
|
|
- echo " User aur" >> /root/.ssh/config
|
2020-06-24 17:25:30 +00:00
|
|
|
- chmod 600 /root/.ssh/{id_rsa*,config}
|
2019-10-31 22:13:37 +00:00
|
|
|
- eval `ssh-agent -s`
|
2020-06-24 17:25:30 +00:00
|
|
|
- echo -en "${SSH_PASSPHRASE}" | ssh-add /root/.ssh/id_rsa
|
2019-10-31 22:13:37 +00:00
|
|
|
- ssh-keyscan -H aur.archlinux.org >> /root/.ssh/known_hosts
|
|
|
|
- git config --global user.name "Dmitry Porunov"
|
2020-06-24 17:25:30 +00:00
|
|
|
- git config --global user.email "dmitry@ykkz.de"
|
2019-10-31 22:13:37 +00:00
|
|
|
|
2019-11-01 01:23:35 +00:00
|
|
|
# Clone, commit and push
|
2019-10-31 22:13:37 +00:00
|
|
|
- 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
|
2020-06-24 17:54:28 +00:00
|
|
|
- git commit -m "Release v$VERSION"
|
2019-10-31 22:13:37 +00:00
|
|
|
- git push
|
|
|
|
- cd ..
|