aboutsummaryrefslogtreecommitdiffstats
path: root/tag
blob: 15ccfea876b8c40c4984c89fabd0f405214db0d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

project='abc80sim'

if [ -z "$1" ]; then
    echo "Usage: $0 version" 1>&2
    exit 1
fi

if [ "$(git diff --cached | wc -l)" != 0 ]; then
    echo "$0: changes already in git cache" 1>&2
    exit 1
fi

echo "#define VERSION \"$1\"" > patchlevel.h
git add patchlevel.h
git commit -m "$project $1"
git tag -a -m "$project $1" "$project-$1"