mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-28 15:14:06 +08:00
Updated travis config to prevent failing
Currently failing due to cached vendor config
This commit is contained in:
parent
7973412c29
commit
2c13ffc120
@ -6,7 +6,6 @@ php:
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- vendor
|
|
||||||
- node_modules
|
- node_modules
|
||||||
- $HOME/.composer/cache
|
- $HOME/.composer/cache
|
||||||
|
|
||||||
@ -29,6 +28,8 @@ before_script:
|
|||||||
- composer install --prefer-dist --no-interaction
|
- composer install --prefer-dist --no-interaction
|
||||||
- npm install
|
- npm install
|
||||||
- ./node_modules/.bin/gulp
|
- ./node_modules/.bin/gulp
|
||||||
|
- php artisan clear-compiled -n
|
||||||
|
- php artisan optimize -n
|
||||||
- php artisan migrate --force -n --database=mysql_testing
|
- php artisan migrate --force -n --database=mysql_testing
|
||||||
- php artisan db:seed --force -n --class=DummyContentSeeder --database=mysql_testing
|
- php artisan db:seed --force -n --class=DummyContentSeeder --database=mysql_testing
|
||||||
|
|
||||||
|
@ -2,33 +2,31 @@
|
|||||||
|
|
||||||
use BookStack\Ownable;
|
use BookStack\Ownable;
|
||||||
|
|
||||||
if (!function_exists('versioned_asset')) {
|
/**
|
||||||
/**
|
* Get the path to a versioned file.
|
||||||
* Get the path to a versioned file.
|
*
|
||||||
*
|
* @param string $file
|
||||||
* @param string $file
|
* @return string
|
||||||
* @return string
|
*
|
||||||
*
|
* @throws \InvalidArgumentException
|
||||||
* @throws \InvalidArgumentException
|
*/
|
||||||
*/
|
function versioned_asset($file)
|
||||||
function versioned_asset($file)
|
{
|
||||||
{
|
static $manifest = null;
|
||||||
static $manifest = null;
|
|
||||||
|
|
||||||
if (is_null($manifest)) {
|
if (is_null($manifest)) {
|
||||||
$manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true);
|
$manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true);
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($manifest[$file])) {
|
|
||||||
return baseUrl($manifest[$file]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists(public_path($file))) {
|
|
||||||
return baseUrl($file);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($manifest[$file])) {
|
||||||
|
return baseUrl($manifest[$file]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_exists(public_path($file))) {
|
||||||
|
return baseUrl($file);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user