Merge branch 'pkg-aur-bin' into 'master'
Release both binary and git AUR packages See merge request timvisee/ffsend!10
This commit is contained in:
commit
c244762f50
3 changed files with 56 additions and 14 deletions
|
@ -176,7 +176,7 @@ github-release:
|
|||
- ./github-release upload --token "$GITHUB_TOKEN" --owner 'timvisee' --repo 'ffsend' --tag "$CI_COMMIT_REF_NAME" --file ffsend-x86_64-linux-gnu --name ffsend-$CI_COMMIT_REF_NAME-linux-x64
|
||||
- ./github-release upload --token "$GITHUB_TOKEN" --owner 'timvisee' --repo 'ffsend' --tag "$CI_COMMIT_REF_NAME" --file ffsend-x86_64-linux-musl --name ffsend-$CI_COMMIT_REF_NAME-linux-x64-static
|
||||
|
||||
# AUR package release
|
||||
# AUR packages release
|
||||
pkg-aur:
|
||||
image: archlinux/base
|
||||
stage: release
|
||||
|
@ -188,8 +188,9 @@ pkg-aur:
|
|||
|
||||
# Update version number in PKGBUILD
|
||||
- VERSION=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
|
||||
- echo "Determined binary version number 'v$VERSION', updating PKGBUILD..."
|
||||
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i PKGBUILD
|
||||
- echo "Determined binary version number 'v$VERSION', updating PKGBUILDs..."
|
||||
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i bin/PKGBUILD
|
||||
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i git/PKGBUILD
|
||||
|
||||
# Install dependencies
|
||||
- echo "Installing required build packages..."
|
||||
|
@ -199,10 +200,17 @@ pkg-aur:
|
|||
- echo "Making AUR package..."
|
||||
- mkdir -p /.cargo
|
||||
- chmod -R 777 /.cargo
|
||||
- cd bin/
|
||||
- echo "Making binary package..."
|
||||
- sudo -u nobody makepkg -c
|
||||
- sudo -u nobody makepkg --printsrcinfo > .SRCINFO
|
||||
- cd ../git
|
||||
- echo "Making git source package..."
|
||||
- sudo -u nobody makepkg -c
|
||||
- sudo -u nobody makepkg --printsrcinfo > .SRCINFO
|
||||
- cd ..
|
||||
|
||||
# Publish: set up SSH key, clone AUR repo, commit update and push
|
||||
# Set up SSH for publishing
|
||||
- mkdir -p /root/.ssh
|
||||
- cp ./aur.pub /root/.ssh/id_rsa.pub
|
||||
- echo "$AUR_SSH_PRIVATE" > /root/.ssh/id_rsa
|
||||
|
@ -214,13 +222,25 @@ pkg-aur:
|
|||
- ssh-add /root/.ssh/id_rsa
|
||||
- ssh-keyscan -H aur.archlinux.org >> /root/.ssh/known_hosts
|
||||
- git config --global user.name "timvisee"
|
||||
- git config --global user.email "timvisee@gmail.com"
|
||||
- git clone ssh://aur@aur.archlinux.org/ffsend.git aur-ffsend
|
||||
- cd aur-ffsend
|
||||
- cp ../{PKGBUILD,.SRCINFO} ./
|
||||
- git config --global user.email "tim@visee.me"
|
||||
|
||||
# Publish binary package: clone AUR repo, commit update and push
|
||||
- git clone ssh://aur@aur.archlinux.org/ffsend.git aur-ffsend-bin
|
||||
- cd aur-ffsend-bin
|
||||
- cp ../bin/{PKGBUILD,.SRCINFO} ./
|
||||
- git add PKGBUILD .SRCINFO
|
||||
- git commit -m "Release v$VERSION"
|
||||
- git push
|
||||
- cd ..
|
||||
|
||||
# Publish git package: clone AUR repo, commit update and push
|
||||
- git clone ssh://aur@aur.archlinux.org/ffsend-git.git aur-ffsend-git
|
||||
- cd aur-ffsend-git
|
||||
- cp ../git/{PKGBUILD,.SRCINFO} ./
|
||||
- git add PKGBUILD .SRCINFO
|
||||
- git commit -m "Release v$VERSION"
|
||||
- git push
|
||||
- cd ..
|
||||
|
||||
# # Snap release
|
||||
# snap:
|
||||
|
@ -240,3 +260,5 @@ pkg-aur:
|
|||
# # - echo "Publishing snap package..."
|
||||
# # - echo "$SNAP_USER\n&SNAP_PASS" | snapcraft login
|
||||
# # - snapcraft push --release=edge ffsend_amd64.snap
|
||||
|
||||
# TODO: add job to test ffsend{-git} AUR packages
|
||||
|
|
18
pkg/aur/bin/PKGBUILD
Normal file
18
pkg/aur/bin/PKGBUILD
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Maintainer: Tim Visee <tim@visee.me>
|
||||
|
||||
pkgname=ffsend
|
||||
pkgver=0.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Easily and securely share files from the command line. A Firefox Send client."
|
||||
url="https://gitlab.com/timvisee/ffsend"
|
||||
license=('GPL3')
|
||||
conflicts=('ffsend-git')
|
||||
source=("ffsend::https://github.com/timvisee/ffsend/releases/download/v$pkgver/ffsend-v$pkgver-linux-x64-static")
|
||||
sha256sums=('SKIP')
|
||||
arch=('x86_64')
|
||||
depends=('ca-certificates')
|
||||
optdepends=('xclip: clipboard support')
|
||||
|
||||
package() {
|
||||
install -D "$srcdir/ffsend" "$pkgdir/usr/bin/ffsend"
|
||||
}
|
|
@ -1,12 +1,14 @@
|
|||
# Maintainer: Tim Visee <timvisee@gmail.com>
|
||||
# Maintainer: Tim Visee <tim@visee.me>
|
||||
|
||||
pkgname=ffsend
|
||||
pkgname=ffsend-git
|
||||
pkgver=0.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Easily and securely share files from the command line. A Firefox Send client."
|
||||
url="https://gitlab.com/timvisee/ffsend"
|
||||
license=('GPL3')
|
||||
source=("$pkgname-v$pkgver.tar.gz::$url/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz")
|
||||
provides=('ffsend=$pkgver')
|
||||
conflicts=('ffsend')
|
||||
source=("ffsend-v$pkgver.tar.gz::$url/-/archive/v$pkgver/ffsend-v$pkgver.tar.gz")
|
||||
sha256sums=('SKIP')
|
||||
arch=('x86_64' 'i686')
|
||||
depends=('ca-certificates')
|
||||
|
@ -14,16 +16,16 @@ makedepends=('openssl>=1.0' 'rust' 'cargo' 'cmake')
|
|||
optdepends=('xclip: clipboard support')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname-v$pkgver"
|
||||
cd "ffsend-v$pkgver"
|
||||
echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2)"
|
||||
#.$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-v$pkgver"
|
||||
cd "ffsend-v$pkgver"
|
||||
env CARGO_INCREMENTAL=0 cargo build --release
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 "$srcdir/$pkgname-v$pkgver/target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||||
install -Dm755 "$srcdir/$pkgname-v$pkgver/target/release/ffsend" "$pkgdir/usr/bin/ffsend"
|
||||
}
|
Loading…
Add table
Reference in a new issue