bump-version.sh 470 B

1234567891011121314151617
  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.cfg
  9. # only bump this on tagged releases
  10. if [[ "$NEW_VERSION" != *.dev0 ]]; then
  11. sed -i -e 's/^SELF_HOSTED_STABLE_VERSION = .*/SELF_HOSTED_STABLE_VERSION = "'"$NEW_VERSION"'"/' src/sentry/conf/server.py
  12. fi
  13. echo "New version: $NEW_VERSION"