|
2 | 2 |
|
3 | 3 | set -eu -o pipefail |
4 | 4 |
|
| 5 | +# Check that we're not on the main branch |
| 6 | +current_branch=$(git branch --show-current) |
| 7 | +if [ "$current_branch" = "main" ]; then |
| 8 | + echo "Error: Releases should not be done directly on the main branch." |
| 9 | + echo "Please create a release branch and run this script from there." |
| 10 | + exit 1 |
| 11 | +fi |
| 12 | + |
5 | 13 | phar='minfraud.phar' |
6 | 14 |
|
7 | 15 | changelog=$(cat CHANGELOG.md) |
@@ -47,10 +55,10 @@ php composer.phar update --no-dev |
47 | 55 | perl -pi -e "s/(?<=const VERSION = ').+?(?=';)/$tag/g" src/MinFraud/ServiceClient.php |
48 | 56 | perl -pi -e "s{(?<=php composer\.phar require maxmind\/minfraud:).+}{^$version}g" README.md |
49 | 57 |
|
50 | | -box_phar_hash='aa0966319f709e74bf2bf1d58ddb987903ae4f6d0a9d335ec2261813c189f7fc box.phar' |
| 58 | +box_phar_hash='f98cf885a7c07c84df66e33888f1d93f063298598e0a5f41ca322aeb9683179b box.phar' |
51 | 59 |
|
52 | 60 | if ! echo "$box_phar_hash" | sha256sum -c; then |
53 | | - wget -O box.phar "https://github.com/box-project/box/releases/download/4.6.6/box.phar" |
| 61 | + wget -O box.phar "https://github.com/box-project/box/releases/download/4.6.10/box.phar" |
54 | 62 | fi |
55 | 63 |
|
56 | 64 | echo "$box_phar_hash" | sha256sum -c |
@@ -95,10 +103,10 @@ if [ -n "$(git status --porcelain)" ]; then |
95 | 103 | fi |
96 | 104 |
|
97 | 105 | # Using Composer is possible, but they don't recommend it. |
98 | | -phpdocumentor_phar_hash='5223cc8455d53c51fcd5a3d4ac7817acdbec3f3e325981688d345f2468097230 phpDocumentor.phar' |
| 106 | +phpdocumentor_phar_hash='aa00973d88b278fe59fd8dce826d8d5419df589cb7563ac379856ec305d6b938 phpDocumentor.phar' |
99 | 107 |
|
100 | 108 | if ! echo "$phpdocumentor_phar_hash" | sha256sum -c; then |
101 | | - wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.7.1/phpDocumentor.phar |
| 109 | + wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.8.1/phpDocumentor.phar |
102 | 110 | fi |
103 | 111 |
|
104 | 112 | echo "$phpdocumentor_phar_hash" | sha256sum -c |
|
0 commit comments