1
0
mirror of https://gitlab.com/ykkzde/posy-cursors synced 2024-10-27 20:44:10 +00:00
archive-posy-cursors/.gitlab-ci.yml

59 lines
2.0 KiB
YAML
Raw Normal View History

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-)
2020-06-24 17:54:28 +00:00
- echo "$CI_COMMIT_REF_NAME"
- echo "Pushing'v$VERSION'"
2019-10-31 22:13:37 +00:00
2020-06-24 17:54:28 +00:00
- sourceURL=https://gitlab.com/ykkzde/posy-cursors/-/archive/v$VERSION/cursorsPosy-v$VERSION.tar.gz?path=themes
- 'echo "Source: $sourceURL"'
- echo "Checking sha256sum checksums"
- 'sourceSHA=$(curl -sSL "$sourceURL" | sha256sum | cut -d" " -f1)'
2019-10-31 22:13:37 +00:00
2019-11-01 01:23:35 +00:00
# Update PKGBUILD version, source URL and sha256sum
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
- sed "s/^source=(\"\(.*\)::.*\").*\$/source=(\"\1::$(echo $sourceURL | sed 's/\//\\\//g')\")/" -i posy-cursors/PKGBUILD
- sed "s/^sha256sums=.*\$/sha256sums=('$sourceSHA')/" -i posy-cursors/PKGBUILD
2019-10-31 22:13: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 17:07:29 +00:00
# Makepkg and .SRCINFO
2019-10-31 22:13:37 +00:00
- cd posy-cursors/
- echo "makepkg"
2019-10-31 22:13:37 +00:00
- sudo -u nobody makepkg -c
- sudo -u nobody makepkg --printsrcinfo > .SRCINFO
- 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 ..