about summary refs log tree commit diff
path: root/gen-version.sh
blob: 3a080157cf4e871d8e4f63d01855d8eeaf36f943 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Get version-info specified in Makefile
V=$1

# Use `git describe` to get current version if we're inside a git repo
if test -d .git
then
	V=$(git describe --abbrev=4 HEAD 2>/dev/null)
fi

new="CGIT_VERSION = $V"
old=$(cat VERSION 2>/dev/null)

# Exit if VERSION is uptodate
test "$old" = "$new" && exit 0

# Update VERSION with new version-info
echo "$new" > VERSION
cat VERSION
>June McEnroe 2020-06-08Replace __dead2 with __attribute__((noreturn))June McEnroe 2020-06-08Replace __FBSDID macros with commentsJune McEnroe 2020-06-08Remove reference to FreeBSD-specific libedit hackJune McEnroe 2020-06-08Prefix mandoc with exec in about-filterJune McEnroe 2020-06-07Remove mktemp options from mkbuiltins, mktokensJune McEnroe 2020-06-07Cast z_stream fields to size_tJune McEnroe 2020-06-07Call static_assert by _Static_assertJune McEnroe 2020-06-07Add OpenBSD to install.shJune McEnroe 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe