rulimine/version.sh

5 lines
224 B
Bash
Raw Normal View History

2022-01-21 04:24:36 +03:00
#! /bin/sh
2022-01-16 08:09:36 +03:00
2022-01-16 08:34:15 +03:00
[ -f version ] || ( git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git log -n1 --pretty='%h' ) | xargs printf '%s'
[ -f version ] && ( cat version 2>/dev/null ) | xargs printf '%s'