Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/VERSION-GEN
2011-08-23 02:05:46 +02:00

18 lines
362 B
Bash
Executable file

#!/bin/sh
VERSION=$(git describe --tags --match "v[0-9]*" HEAD 2>/dev/null)
if [ -n "$(git status --porcelain)" ]; then
VERSION="${VERSION}-dirty"
fi
if [ -f "${1}" ]; then
OLD=$(cat ${1} | sed 's/VERSION = //')
else
OLD=""
fi
if [ "${VERSION}" != "${OLD}" ]; then
echo >&2 " Archived ${VERSION}"
echo "ARCHIVED_VERSION = ${VERSION}"
fi