This commit is contained in:
Abraham Toriz 2021-12-13 14:01:10 -06:00
parent 6f341bcbf4
commit 342351e4ad
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
2 changed files with 97 additions and 0 deletions

46
scripts/release-aur-bin.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
# some useful variables
VERSION=${CI_COMMIT_TAG:1}
PROJECT_NAME=tiempo
PROJECT_BINARY=t
ARCHIVENAME=$PROJECT_NAME-$VERSION-x86_64.tar.gz
# clone the repo
git clone $BIN_REPO_URL $PROJECT_NAME-bin
# enter it
cd $PROJECT_NAME-bin
# get the sum from the artifacts
SUM=( `cat ../$ARCHIVENAME.sum` )
# Generate the PKGBUILD
echo "# Maintainer: Abraham Toriz <categulario at gmail dot com>
pkgname=$PROJECT_NAME-bin
pkgver=$VERSION
pkgrel=1
pkgdesc='A free-hand vector drawing application with infinite canvas'
arch=('x86_64')
url='https://gitlab.com/categulario/tiempo-rs'
license=('GPL3')
depends=('gtk3')
provides=('$PROJECT_NAME')
conflicts=('$PROJECT_NAME')
source=(\"https://$PROJECT_NAME.categulario.tk/releases/any-linux/$PROJECT_NAME-\$pkgver-\$arch.tar.gz\")
sha256sums=('$SUM')
package() {
cd \"\$srcdir/build\"
install -Dm755 $PROJECT_BINARY \"\$pkgdir\"/usr/bin/$PROJECT_BINARY
install -Dm644 README.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/README.md
install -Dm644 LICENSE \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/LICENSE
install -Dm644 CHANGELOG.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/CHANGELOG.md
}
" | tee PKGBUILD > /dev/null
makepkg --printsrcinfo > .SRCINFO
git add .
git commit -m "Release version $VERSION"
git push

51
scripts/release-aur-git.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
# Needed variables
VERSION=${CI_COMMIT_TAG:1}
PROJECT_NAME=tiempo
PROJECT_BINARY=t
# clone the repo
git clone $GIT_REPO_URL $PROJECT_NAME-git
# enter it
cd $PROJECT_NAME-git
echo "# Maintainer: Abraham Toriz <categulario at gmail dot com>
pkgname=$PROJECT_NAME-git
pkgver=$VERSION
pkgrel=1
pkgdesc='Simple Gtk drawing application'
arch=('i686' 'x86_64')
url='https://gitlab.com/categulario/tiempo-rs'
license=('GPL3')
depends=('gtk3')
makedepends=('cargo' 'git')
provides=('$PROJECT_NAME')
conflicts=('$PROJECT_NAME')
source=('$PROJECT_NAME-git::git+https://gitlab.com/categulario/tiempo-rs')
sha256sums=('SKIP')
pkgver() {
cd \"\$pkgname\"
printf \"%s\" \"\$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/v//g')\"
}
build() {
cd \"\$pkgname\"
cargo build --release --locked
}
package() {
cd \"\$pkgname\"
install -Dm755 target/release/$PROJECT_NAME \"\$pkgdir\"/usr/bin/$PROJECT_NAME
install -Dm644 README.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/README.md
install -Dm644 LICENSE \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/LICENSE
install -Dm644 CHANGELOG.md \"\$pkgdir\"/usr/share/doc/$PROJECT_NAME/CHANGELOG.md
}" | tee PKGBUILD > /dev/null
makepkg --printsrcinfo > .SRCINFO
git add .
git commit -m "Release version $VERSION"
git push