Добавлены вспомогательные информационные утилиты GIT

This commit is contained in:
Aren Elchinyan 2023-11-18 14:47:30 +03:00
parent 4500aa6869
commit 18c2d9f67e
2 changed files with 13 additions and 0 deletions

3
scripts/git_changelog.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo $(git log --pretty=format:%s ${LAST}..HEAD | grep ':' | sed -re 's/([^:]*)\:/- \`\1\`\:/' | sort)

10
scripts/git_version.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
VERSION=`git rev-parse --short HEAD`
X=$(git status -s | grep -q '^.M')
if [ $? -eq 0 ]; then
VERSION="$VERSION"
fi
echo -n $VERSION