This repository has been archived by the owner on Aug 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
79 lines (70 loc) · 3.18 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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 "[email protected]"
# Clone, commit and push
- git clone ssh://[email protected]/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 ..