forked from facebookarchive/instant-articles-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·40 lines (34 loc) · 790 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
blue=`tput setaf 4`
reset=`tput sgr0`
function message {
printf $blue
echo $@
printf $reset
}
message "Moving to repository root"
cd "$(dirname "$0")"
message "Downloading PHP binaries for Windows..."
rm -Rf bin
mkdir bin
cd bin
curl -o php.zip http://windows.php.net/downloads/releases/php-5.6.33-Win32-VC11-x86.zip
message "Extracting PHP binary..."
unzip php.zip -d ./php
rm php.zip
message "PHP binary extracted"
cp ../php.ini ./php/php.ini
message "Installing PHP dependencies..."
cd ..
cd webserver
composer install
message "PHP dependencies installed"
message "Building packages..."
cd ..
npm run-script build
printf $green
echo "🍺 Build done! Open ./build to see the packages."
printf $reset