Skip to content

Commit 0bde2e7

Browse files
committed
Update release scipt
1 parent f894b64 commit 0bde2e7

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

dev-bin/release.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
set -eu -o pipefail
44

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+
513
phar='minfraud.phar'
614

715
changelog=$(cat CHANGELOG.md)
@@ -47,10 +55,10 @@ php composer.phar update --no-dev
4755
perl -pi -e "s/(?<=const VERSION = ').+?(?=';)/$tag/g" src/MinFraud/ServiceClient.php
4856
perl -pi -e "s{(?<=php composer\.phar require maxmind\/minfraud:).+}{^$version}g" README.md
4957

50-
box_phar_hash='aa0966319f709e74bf2bf1d58ddb987903ae4f6d0a9d335ec2261813c189f7fc box.phar'
58+
box_phar_hash='f98cf885a7c07c84df66e33888f1d93f063298598e0a5f41ca322aeb9683179b box.phar'
5159

5260
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"
5462
fi
5563

5664
echo "$box_phar_hash" | sha256sum -c
@@ -95,10 +103,10 @@ if [ -n "$(git status --porcelain)" ]; then
95103
fi
96104

97105
# Using Composer is possible, but they don't recommend it.
98-
phpdocumentor_phar_hash='5223cc8455d53c51fcd5a3d4ac7817acdbec3f3e325981688d345f2468097230 phpDocumentor.phar'
106+
phpdocumentor_phar_hash='aa00973d88b278fe59fd8dce826d8d5419df589cb7563ac379856ec305d6b938 phpDocumentor.phar'
99107

100108
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
102110
fi
103111

104112
echo "$phpdocumentor_phar_hash" | sha256sum -c

0 commit comments

Comments
 (0)