File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,26 @@ install_extension ()
38
38
fi
39
39
40
40
sudo cp ${PROJECT_DIRECTORY} /.evergreen/config/php.ini ${PHP_PATH} /lib/php.ini
41
+
42
+ php --ri mongodb
43
+ }
44
+
45
+ install_composer ()
46
+ {
47
+ EXPECTED_CHECKSUM=" $( php -r ' copy("https://composer.github.io/installer.sig", "php://stdout");' ) "
48
+ php -r " copy('https://getcomposer.org/installer', 'composer-setup.php');"
49
+ ACTUAL_CHECKSUM=" $( php -r " echo hash_file('sha384', 'composer-setup.php');" ) "
50
+
51
+ if [ " $EXPECTED_CHECKSUM " != " $ACTUAL_CHECKSUM " ]; then
52
+ >&2 echo ' ERROR: Invalid installer checksum'
53
+ rm composer-setup.php
54
+ exit 1
55
+ fi
56
+
57
+ php composer-setup.php --quiet
58
+ RESULT=$?
59
+ rm composer-setup.php
60
+ exit $RESULT
41
61
}
42
62
43
63
# Functions to fetch MongoDB binaries
@@ -88,12 +108,6 @@ OLD_PATH=$PATH
88
108
PATH=$PHP_PATH /bin:$OLD_PATH
89
109
90
110
install_extension
91
-
92
- php --ri mongodb
93
-
94
- # Install composer
95
- php -r " copy('https://getcomposer.org/installer', 'composer-setup.php');"
96
- php composer-setup.php
97
- php -r " unlink('composer-setup.php');"
111
+ install_composer
98
112
99
113
php composer.phar update $COMPOSER_FLAGS
You can’t perform that action at this time.
0 commit comments