Package Details: geticons-git 1.2.2.r1.g322fba4-1

Git Clone URL: https://aur.archlinux.org/geticons-git.git (read-only, click to copy)
Package Base: geticons-git
Description: CLI tool to get icons on Linux and other Freedesktop systems
Upstream URL: https://git.sr.ht/~zethra/geticons
Licenses: GPL
Conflicts: geticons
Provides: geticons
Submitter: Piroro-hs
Maintainer: Piroro-hs
Last Packager: Piroro-hs
Votes: 1
Popularity: 0.000630
First Submitted: 2022-09-25 10:26 (UTC)
Last Updated: 2023-06-11 12:28 (UTC)

Dependencies (3)

Required by (0)

Sources (1)

Latest Comments

xiota commented on 2023-06-11 18:32 (UTC) (edited on 2023-06-11 18:33 (UTC) by xiota)

The following will extract and search for the version from Cargo.toml instead of hard coding a specific revision in the PKGBUILD. It can be adapted to other projects that don't tag properly by editing the _regex and _file.

pkgver() {
  cd "$pkgname"

  _regex='^version\s+=\s+"([0-9]+\.[0-9]+(\.[0-9]+)?)"$'
  _file='Cargo.toml'

  _line=$(
    grep -E "$_regex" "$_file" | head -1
  )
  _version=$(
    echo "$_line" | sed -E "s@$_regex@\1@"
  )
  _commit=$(
    git log -S "$_line" -1 --pretty=oneline --no-color | sed 's@\ .*$@@'
  )
  _revision=$(
    git rev-list --count $_commit..HEAD
  )
  _hash=$(
    git rev-parse --short HEAD
  )

  echo "$_version.r$_revision.g$_hash"
}

Piroro-hs commented on 2023-06-11 12:29 (UTC)

@D3vil0p3r Fixed. Thanks.

D3vil0p3r commented on 2023-06-10 19:05 (UTC) (edited on 2023-06-10 19:05 (UTC) by D3vil0p3r)

Hey @Piroro-hs The package cannot be built. In pkgver(), the git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' command does not return anything. It should be replaced by:

echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)

Could you fix it please?