Skip to content

Commit 80edbfb

Browse files
committed
Some additional improvements to the replit configuration
Change-Id: I81b73e88256a44b76175a6cd7de19f1007ecfb63
1 parent aeb4911 commit 80edbfb

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

.replit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
run="./build/helper composer test"
22
language="php_cli"
3-
onBoot="bash build/replit-after-boot.sh"
3+
onBoot="/bin/bash build/replit-after-boot.sh"

build/replit-after-boot.sh

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,35 @@ set -eu -o pipefail
1010
ROOTDIR=$(realpath $(dirname "$0")/..)
1111
echo Installing dependencies from $ROOTDIR
1212
cd $ROOTDIR
13+
chmod a+rx $ROOTDIR/build/helper
1314

14-
install-pkg php-mbstring
15-
install-pkg php-curl
16-
export PHPRC=$ROOTDIR/build/replit.ini
17-
export PATH=$PATH:/home/runner/bin:$ROOTDIR/vendor/bin
15+
# Show configuration progress with a temporary directory we set up.
16+
mkdir .INSTALLING_1_of_4
17+
18+
cd /home/runner
1819
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
1920
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
2021
mkdir -p /home/runner/bin
2122
php composer-setup.php --install-dir=/home/runner/bin --filename=composer
2223
php -r "unlink('composer-setup.php');"
24+
cd $ROOTDIR
25+
26+
mkdir .INSTALLING_2_of_4
27+
28+
install-pkg php-mbstring
29+
30+
mkdir .INSTALLING_3_of_4
31+
32+
install-pkg php-curl
33+
34+
mkdir .INSTALLING_4_of_4
35+
36+
export PHPRC=$ROOTDIR/build/replit.ini
37+
export PATH=$PATH:/home/runner/bin:$ROOTDIR/vendor/bin
2338

2439
/home/runner/bin/composer update
40+
41+
rmdir .INSTALLING_1_of_4
42+
rmdir .INSTALLING_2_of_4
43+
rmdir .INSTALLING_3_of_4
44+
rmdir .INSTALLING_4_of_4

0 commit comments

Comments
 (0)