Skip to content

Instantly share code, notes, and snippets.

@Ferdi265
Created June 19, 2020 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ferdi265/12e138aa64d166e0b38588c71eb3e474 to your computer and use it in GitHub Desktop.
Save Ferdi265/12e138aa64d166e0b38588c71eb3e474 to your computer and use it in GitHub Desktop.
Add automatic package version to vim-lightline-git
diff --git a/PKGBUILD b/PKGBUILD
index e640bbc..028ca2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor:
pkgname=vim-lightline-git
-pkgver=latest
+pkgver=r626.3afa010
pkgrel=1
pkgdesc='A light and configurable statusline/tabline for Vim'
arch=('any')
@@ -15,6 +15,11 @@ install='vimdoc.install'
source=("git://github.com/itchyny/lightline.vim.git")
md5sums=('SKIP')
+pkgver() {
+ cd "lightline.vim"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+}
+
package() {
cd "lightline.vim"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment