This repository has been archived by the owner on May 17, 2024. It is now read-only.
forked from thedevdojo/voyager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (48 loc) · 1.75 KB
/
.travis.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
language: php
sudo: true
php:
- 5.6
- 7.0
services:
- mysql
before_script:
# prevent MySQL went away error
- mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;'
# Create a new database and add all priveleges
- mysql -u root -e "create database IF NOT EXISTS voyager;"
# Current DIR
- pwd
# Move up one directory
- cd ../
# Create a New Laravel App
- composer create-project --prefer-dist laravel/laravel voyager-app
# CD into the new laravel app
- cd voyager-app
# Include Voyager Package
- composer require tcg/voyager
# Remove the current version
- rm -rf vendor/tcg/voyager
# Move this build into the voyager folder
- mv /home/travis/build/the-control-group/voyager /home/travis/build/the-control-group/voyager-app/vendor/tcg/voyager
# Move up one folder and rename voyager-app to voyager
- cd ../
- mv voyager-app voyager
- cd voyager
- composer dump-autoload
# Add the database credentials
- sed 's/DB_DATABASE=homestead/DB_DATABASE=voyager/g' .env > environment
- sed 's/DB_USERNAME=homestead/DB_USERNAME=root/g' environment > .env
- sed 's/DB_PASSWORD=secret/DB_PASSWORD=/g' .env > environment
- rm .env
- mv environment .env
# Add the service providers
- sed 's/App\\Providers\\RouteServiceProvider\:\:class,/App\\Providers\\RouteServiceProvider\:\:class, TCG\\Voyager\\VoyagerServiceProvider\:\:class, Intervention\\Image\\ImageServiceProvider\:\:class,/g' config/app.php > config/app-temp.php
- rm config/app.php
- mv config/app-temp.php config/app.php
# Install voyager
- php artisan voyager:install
# Remove the default phpunit.xml and replace it with voyager phpunit.xml
- rm phpunit.xml
- cp vendor/tcg/voyager/phpunit.xml phpunit.xml
script:
# - vendor/bin/phpunit