version.sh 450 B

123456789101112
  1. #!/bin/bash
  2. cd `dirname $0`/..
  3. #ReleaseSeries.MinorVersion
  4. Version=`git rev-parse --abbrev-ref HEAD | tail -1`.$(( (`TZ=UTC date +%s`-`cat ../InitDate.txt`) / 16920 ))
  5. if [ "x$1" != "x-r" ]; then
  6. sed -i "s/__version__ = '.*'/__version__ = '$Version'/" youtube_dl/version.py
  7. sed -i "s/<unreleased>/$Version/" ChangeLog
  8. sed -i "s/<unreleased>/$Version/" ../Patches/Files/ChangeLog
  9. #git tag -s -m "Release $version" "$version"
  10. fi
  11. echo -n ${Version}