From 5f1e354e91b54f8b97080bfe3e283dc7b40a3214 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 24 Sep 2018 23:20:02 +0200 Subject: [PATCH] Added tag name function. --- src/git.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/git.php b/src/git.php index f3327d58..86c341ee 100644 --- a/src/git.php +++ b/src/git.php @@ -22,3 +22,8 @@ function git_branch(): string { return trim(shell_exec('git rev-parse --abbrev-ref HEAD')); } + +function git_tag(): string +{ + return trim(shell_exec('git describe --abbrev=0 --tags')); +}