2019-10-07 22:43:05 +02:00
|
|
|
echo "1/3 Building frontend..."
|
2018-05-11 00:59:56 +02:00
|
|
|
cd client
|
2019-10-07 22:37:16 +02:00
|
|
|
npm run build
|
2018-05-11 00:59:56 +02:00
|
|
|
rm build/index.html
|
2019-10-07 22:43:05 +02:00
|
|
|
echo "2/3 Creating api folder..."
|
2018-05-11 00:59:56 +02:00
|
|
|
cd ../server
|
2019-10-07 22:37:16 +02:00
|
|
|
echo -n > config.php
|
2018-10-20 21:21:50 +02:00
|
|
|
mkdir files2
|
|
|
|
mv files/.htaccess files2
|
|
|
|
rm -rf files/
|
|
|
|
mv files2 files
|
2018-05-11 00:59:56 +02:00
|
|
|
cd ..
|
|
|
|
mkdir api
|
2019-10-08 00:05:32 +02:00
|
|
|
mv server/index.php api
|
|
|
|
mv server/.htaccess api
|
|
|
|
mv server/composer.json api
|
|
|
|
mv server/composer.lock api
|
|
|
|
mv server/controllers api
|
|
|
|
mv server/data api
|
|
|
|
mv server/libs api
|
|
|
|
mv server/models api
|
|
|
|
mv server/vendor api
|
|
|
|
mv server/files api
|
2019-10-07 22:37:16 +02:00
|
|
|
cp server/config.php api
|
2019-10-08 00:05:32 +02:00
|
|
|
chmod -R 755 .
|
2019-10-07 22:37:16 +02:00
|
|
|
cp client/src/index.php client/build
|
2019-10-07 22:43:05 +02:00
|
|
|
echo "3/3 Generating zip..."
|
2018-05-11 00:59:56 +02:00
|
|
|
cd client/build
|
|
|
|
zip opensupports_dev.zip index.php
|
|
|
|
zip -u opensupports_dev.zip .htaccess
|
2019-10-07 22:37:16 +02:00
|
|
|
zip -u opensupports_dev.zip bundle.js
|
2018-05-11 00:59:56 +02:00
|
|
|
zip -ur opensupports_dev.zip images
|
|
|
|
mv opensupports_dev.zip ../..
|
|
|
|
cd ../..
|
|
|
|
zip -ur opensupports_dev.zip api
|
|
|
|
mkdir dist
|
|
|
|
mv opensupports_dev.zip dist
|