You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
398 B

#!/bin/sh
VERSION=$(git describe --always --tags --dirty)
if [ $? -ne 0 ]; then
VERSION=$(cat VERSION)
fi
if [ "${VERSION}" = "" ]; then
VERSION="unknown"
fi
echo -n "${VERSION}" > VERSION
grep -q \"${VERSION}\" src/version.hpp
RV=$?
if [ $RV -ne 0 ]; then
echo "#pragma once" > src/version.hpp
echo "static const char MERGERFS_VERSION[] = \"${VERSION}\";" >> src/version.hpp
fi