Missing attribute from cl_amd_device_attribute_query
[clinfo] / new-version.sh
1 #!/bin/sh
2
3 # Change the version recorded in src/clinfo.c and man1/clinfo.1 to
4 # the current highest OpenCL supported standard followed by current
5 # yy.mm.dd
6
7 abort() {
8         echo "$1" >&2
9         exit 1
10 }
11
12 test -n "$(git status --porcelain | grep -v '??')" && abort "Uncommited changes, aborting"
13
14 DATE=$(date +%Y-%m-%d)
15 MAJOR=$(awk '/^OpenCL/ { print $NF ; exit }' man1/clinfo.1)
16 SUBV=$(date +%y.%m.%d)
17 VERSION="$MAJOR$SUBV"
18
19 sed -i -e "/clinfo version/ s/version \S\+\"/version $VERSION\"/" src/clinfo.c &&
20 sed -i -e "1 s/\".\+$/\"$DATE\" \"clinfo $VERSION\"/" man1/clinfo.1 &&
21 sed -i -e "1 s/\".\+$/version: $VERSION-{build}/" .appveyor.yml &&
22 git commit -m "Version $VERSION" -e -a &&
23 git tag -m "Version $VERSION" $VERSION