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.

16 lines
348 B

  1. #!/bin/sh
  2. GIT=$(which git)
  3. if [ "${GIT}" = "" ]; then
  4. exit 0
  5. fi
  6. VERSION=$(git describe --always --tags --dirty)
  7. echo -n "${VERSION}" > VERSION
  8. grep -q \"${VERSION}\" src/version.hpp
  9. RV=$?
  10. if [ $RV -ne 0 ]; then
  11. echo "#pragma once" > src/version.hpp
  12. echo "static const char MERGERFS_VERSION[] = \"${VERSION}\";" >> src/version.hpp
  13. fi