update_version_git 742 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. #
  3. # Update the current version date in DATESTAMP files and generate
  4. # ChangeLog file entries since the last DATESTAMP update from the
  5. # commit messages.
  6. GITROOT=${GITROOT:-"/git/gcc.git"}
  7. if [ -z "$TMPDIR" ]; then
  8. if [ -d /sourceware/snapshot-tmp/gcc ]; then
  9. TMPDIR=/sourceware/snapshot-tmp/gcc
  10. else
  11. TMPDIR=/tmp
  12. fi
  13. fi
  14. # Run this from $TMPDIR.
  15. export GITROOT TMPDIR
  16. BASEDIR=`mktemp -d`
  17. cd "$BASEDIR"
  18. GIT=${GIT:-/usr/local/bin/git}
  19. # Assume all will go well.
  20. SUBDIR="$BASEDIR/gcc"
  21. ${GIT} clone -q -b master "$GITROOT" "$SUBDIR"
  22. cp -a "$SUBDIR"/contrib/gcc-changelog "$BASEDIR"/gcc-changelog
  23. cd "$SUBDIR"
  24. python3 ../gcc-changelog/git_update_version.py -p
  25. RESULT=$?
  26. cd "$TMPDIR"
  27. /bin/rm -rf "$BASEDIR"
  28. exit $RESULT