-
Notifications
You must be signed in to change notification settings - Fork 29
/
api-update.sh
43 lines (28 loc) · 1.17 KB
/
api-update.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
41
42
43
#!/bin/bash
cd /var/www/laravel.com/sami
rm -rf /var/www/laravel.com/sami/build
rm -rf /var/www/laravel.com/sami/cache
# Run API Docs For Master
git clone https://github.com/laravel/framework.git /var/www/laravel.com/sami/laravel
php /var/www/laravel.com/sami/sami.php update /var/www/laravel.com/sami/config.php
cp -r /var/www/laravel.com/sami/build/* /var/www/laravel.com/public/api/master
rm -rf /var/www/laravel.com/sami/build
rm -rf /var/www/laravel.com/sami/cache
# Run API Docs For 4.1
cd /var/www/laravel.com/sami/laravel
git checkout -b 4.1 origin/4.1
cd ..
php /var/www/laravel.com/sami/sami.php update /var/www/laravel.com/sami/config.php
cp -r /var/www/laravel.com/sami/build/* /var/www/laravel.com/public/api/4.1
rm -rf /var/www/laravel.com/sami/build
rm -rf /var/www/laravel.com/sami/cache
# Run API Docs For 4.0
cd /var/www/laravel.com/sami/laravel
git checkout -b 4.0 origin/4.0
cd ..
php /var/www/laravel.com/sami/sami.php update /var/www/laravel.com/sami/config.php
cp -r /var/www/laravel.com/sami/build/* /var/www/laravel.com/public/api/4.0
rm -rf /var/www/laravel.com/sami/build
rm -rf /var/www/laravel.com/sami/cache
# Cleanup
rm -rf /var/www/laravel.com/sami/laravel