mirror of
https://gitlab.com/ykkzde/posy-cursors
synced 2024-10-27 20:44:10 +00:00
80 lines
3.2 KiB
YAML
80 lines
3.2 KiB
YAML
stages:
|
|
- package
|
|
|
|
package-aur:
|
|
image: archlinux/base
|
|
stage: package
|
|
dependencies: []
|
|
only:
|
|
- /^v(\d+\.)*\d+$/
|
|
before_script: []
|
|
script:
|
|
- cd ./pkg/aur
|
|
|
|
- _version=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
|
|
- echo "Pushing'v$_version'"
|
|
|
|
<<<<<<< HEAD
|
|
- 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)'
|
|
=======
|
|
# Determine remote URLs and SHA checksums
|
|
- echo "Determining SHA checksums for remote files..."
|
|
- URL_SOURCE=https://git.auteiy.me/dmitry/cursorsPosy/-/archive/v$VERSION/cursorsPosy-v$VERSION.tar.gz
|
|
- 'echo "Selected source URL: $URL_SOURCE"'
|
|
- echo "Determining sha256sum for remote source..."
|
|
- 'SHA_SOURCE=$(curl -sSL "$URL_SOURCE" | sha256sum | cut -d" " -f1)'
|
|
- 'echo "Got sha256sum: $SHA_SOURCE"'
|
|
>>>>>>> 1adbf2c... Fix source url
|
|
|
|
# Update PKGBUILD version, source URL and sha256sum
|
|
- echo "Updating PKGBUILDS with release information..."
|
|
<<<<<<< HEAD
|
|
- 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
|
|
=======
|
|
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i posy-cursors/PKGBUILD
|
|
- sed "s/^source=(\"\(.*\)::.*\").*\$/source=(\"\1::$(echo $URL_SOURCE | sed 's/\//\\\//g')\")/" -i posy-cursors/PKGBUILD
|
|
- sed "s/^sha256sums=.*\$/sha256sums=('$SHA_SOURCE')/" -i posy-cursors/PKGBUILD
|
|
|
|
# Get SHA hash for local and remote file w/o version, update if it has changed
|
|
# - 'SHA_STRIP_LOCAL=$(cat ffsend-git/PKGBUILD | sed /^pkgver=.\*/d | sha256sum | cut -d" " -f1)'
|
|
# - 'SHA_STRIP_REMOTE=$(curl -sSL "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=ffsend-git" | sed /^pkgver=.\*/d | sha256sum | cut -d" " -f1)'
|
|
>>>>>>> 1adbf2c... Fix source url
|
|
|
|
- echo "Installing Arch"
|
|
- pacman -Syu --noconfirm sudo base-devel openssh git openssl
|
|
|
|
# makepkg and .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 "$sshAUR" | 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 "${sshPASSPHRASE}" | 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@auteiy.me"
|
|
|
|
# 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 ..
|