Skip to content

Commit

Permalink
ref: Use constant for the SDK version
Browse files Browse the repository at this point in the history
docs: Update README.md & CONTRIBUTING.md (#650)

* docs: Update README.md & CONTRIBUTING.md

* Add slogan

test: Add dsn to e2e test config (#657)

* test: Add dsn to e2e test config

* Add phpstan exclusion

Fix Symfony 6 deprecations in E2E test (#656)

fix: Update span ops (#655)

docs: Update changelog (#658)

Prepare release 4.3.1 (#659)

Update phpstan.neon

Add bump-version.sh
  • Loading branch information
cleptric committed Oct 11, 2022
1 parent 669afc9 commit 7f8e9db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 0 additions & 1 deletion .craft.yml
Expand Up @@ -2,7 +2,6 @@ minVersion: 0.23.1
changelogPolicy: simple
artifactProvider:
name: none
preReleaseCommand: ''
targets:
- name: github
- name: registry
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon
Expand Up @@ -16,6 +16,8 @@ parameters:
- src/Tracing/Doctrine/DBAL/TracingDriverForV2.php
- src/Tracing/HttpClient/TraceableHttpClientForV4.php
- src/Tracing/HttpClient/TraceableHttpClientForV5.php
- src/Tracing/HttpClient/TraceableResponseForV4.php
- src/Tracing/HttpClient/TraceableResponseForV5.php
- tests/End2End/App
- tests/Tracing/Doctrine/DBAL/TracingDriverForV2Test.php
- tests/EventListener/Fixtures/UserWithoutIdentifierStub.php
Expand Down
24 changes: 24 additions & 0 deletions scripts/bump-version.sh
@@ -0,0 +1,24 @@
#!/bin/bash
set -eux

# if [ "$(uname -s)" != "Linux" ]; then
# echo "Please use the GitHub Action."
# exit 1
# fi

SCRIPT_DIR="$( dirname "$0" )"
cd $SCRIPT_DIR/..

OLD_VERSION="${1}"
NEW_VERSION="${2}"

echo "Current version: $OLD_VERSION"
echo "Bumping version: $NEW_VERSION"

function replace() {
! grep "$2" $3
perl -i -pe "s/$1/$2/g" $3
grep "$2" $3 # verify that replacement was successful
}

replace "SDK_VERSION = '[0-9.]+'" "SDK_VERSION = '$NEW_VERSION'" ./src/SentryBundle.php

0 comments on commit 7f8e9db

Please sign in to comment.