Skip to content
Permalink
Browse files
AVRO-3510: Do not hardcode the PHP Composer installer Sha384 in Travi…
…sCI (#1678)

* AVRO-3510: Do not hardcode the PHP Composer installer Sha384 in TravisCI

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>

* AVRO-3510: Use installer.sig file

installer.sha384sum has additional content

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
  • Loading branch information
martin-g committed May 4, 2022
1 parent c2bd724 commit 95440c4c5b904d93cfa878d3e13879a20ff499ff
Showing 1 changed file with 2 additions and 1 deletion.
@@ -203,8 +203,9 @@ matrix:
- libtidy-dev
- libpq5
install:
-
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php -r "if (hash_file('sha384', 'composer-setup.php') === file_get_contents('https://composer.github.io/installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php composer-setup.php --version=2.2.5
- php -r "unlink('composer-setup.php');"
- sudo mv composer.phar /usr/local/bin/composer

0 comments on commit 95440c4

Please sign in to comment.