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

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