2019-10-31 22:18:59 +00:00
|
|
|
stages:
|
|
|
|
- package
|
|
|
|
|
2019-10-31 22:13:37 +00:00
|
|
|
package-aur:
|
|
|
|
image: archlinux/base
|
|
|
|
stage: package
|
|
|
|
dependencies: []
|
|
|
|
only:
|
|
|
|
- /^v(\d+\.)*\d+$/
|
|
|
|
before_script: []
|
|
|
|
script:
|
|
|
|
- cd ./pkg/aur
|
|
|
|
|
2019-11-01 00:27:37 +00:00
|
|
|
- _version=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
|
|
|
|
- echo "Pushing'v$_version'"
|
2019-10-31 22:13:37 +00:00
|
|
|
|
2019-11-01 00:27:37 +00:00
|
|
|
- sourceURL=https://git.auteiy.me/dmitry/cursorsPosy/-/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..."
|
2019-11-01 00:27:37 +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
|
|
|
|
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
|
|
|
|
|
2019-11-01 01:23:35 +00:00
|
|
|
# makepkg and .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
|
2019-11-01 00:27:37 +00:00
|
|
|
- echo "$sshAUR" | 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
|
|
|
|
- chmod 600 /root/.ssh/{id_rsa*,config}
|
|
|
|
- eval `ssh-agent -s`
|
2019-11-01 00:27:37 +00:00
|
|
|
- echo -en "${sshPASSPHRASE}" | 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"
|
|
|
|
- git config --global user.email "dmitry@auteiy.me"
|
|
|
|
|
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
|
2019-11-01 00:27:37 +00:00
|
|
|
- git commit -m "Release v$_version"
|
2019-10-31 22:13:37 +00:00
|
|
|
- git push
|
|
|
|
- cd ..
|