3232
3333check_command perl
3434check_command php
35- check_command wget
35+
36+ # box.phar, composer.phar, and phpDocumentor.phar are managed by mise (see
37+ # mise.toml)
38+ check_command box.phar
39+ check_command composer.phar
40+ check_command phpDocumentor.phar
3641
3742# Check that we're not on the main branch
3843current_branch=$( git branch --show-current)
8994
9095rm -fr vendor
9196
92- php composer.phar self-update
93- php composer.phar update --no-dev
97+ composer.phar update --no-dev
9498
9599perl -pi -e " s/(?<=const VERSION = ').+?(?=';)/$tag /g" src/WebService/Client.php
96100perl -pi -e " s{(?<=php composer\.phar require geoip2/geoip2:).+}{^$version }g" README.md
97101
98- box_phar_hash=' f98cf885a7c07c84df66e33888f1d93f063298598e0a5f41ca322aeb9683179b box.phar'
99-
100- if ! echo " $box_phar_hash " | sha256sum -c; then
101- wget -O box.phar " https://github.com/box-project/box/releases/download/4.6.10/box.phar"
102- fi
103-
104- echo " $box_phar_hash " | sha256sum -c
105-
106- php box.phar compile
102+ box.phar compile
107103
108104phar_test=$( ./dev-bin/phar-test.php)
109105if [[ -n $phar_test ]]; then
@@ -112,7 +108,7 @@ if [[ -n $phar_test ]]; then
112108fi
113109
114110# Download test deps
115- php composer.phar update
111+ composer.phar update
116112
117113./vendor/bin/phpunit
118114
@@ -141,20 +137,11 @@ if [ -n "$(git status --porcelain)" ]; then
141137 exit 1
142138fi
143139
144- # Using Composer is possible, but they don't recommend it.
145- phpdocumentor_phar_hash=' aa00973d88b278fe59fd8dce826d8d5419df589cb7563ac379856ec305d6b938 phpDocumentor.phar'
146-
147- if ! echo " $phpdocumentor_phar_hash " | sha256sum -c; then
148- wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.8.1/phpDocumentor.phar
149- fi
150-
151- echo " $phpdocumentor_phar_hash " | sha256sum -c
152-
153140# Use cache dir in /tmp as otherwise cache files get into the output directory.
154141cachedir=" /tmp/phpdoc-$$ -$RANDOM "
155142rm -rf " $cachedir "
156143
157- php phpDocumentor.phar \
144+ phpDocumentor.phar \
158145 --visibility=public \
159146 --cache-folder=" $cachedir " \
160147 --title=" GeoIP PHP API $tag " \
0 commit comments