Skip to content

Commit f27f5ab

Browse files
committed
fix: Add simple bump script
1 parent 8fac7c2 commit f27f5ab

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.craft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ github:
33
owner: getsentry
44
repo: sentry-laravel
55
changelogPolicy: simple
6+
preReleaseCommand: bash scripts/craft-pre-release.sh
67
targets:
78
- name: github
89
- name: registry

scripts/craft-pre-release.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
set -eux
3+
# Move to the project root
4+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
cd $SCRIPT_DIR
6+
OLD_VERSION="${1}"
7+
NEW_VERSION="${2}"
8+
9+
php versionbump.php "${NEW_VERSION}"

scripts/versionbump.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
$re = '/\d+\.\d+.\d+(?:-\w+(?:\.\w+)?)?/m';
4+
5+
$result = preg_replace($re, $argv[1], file_get_contents('../src/Sentry/Laravel/Version.php'));
6+
file_puts_contents('../src/Sentry/Laravel/Version.php', $result);

0 commit comments

Comments
 (0)