bump-version.sh 370 B

1234567891011121314
  1. #!/bin/bash
  2. set -eu
  3. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  4. cd "$SCRIPT_DIR/.."
  5. # shellcheck disable=SC2034
  6. OLD_VERSION="$1"
  7. NEW_VERSION="$2"
  8. sed -i -e "s/^VERSION = "'".*"'"\$/VERSION = "'"'"$NEW_VERSION"'"'"/" setup.py
  9. sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
  10. echo "New version: $NEW_VERSION"