Set new version automatically
This commit is contained in:
parent
f8bba6b7b7
commit
7f58d92590
|
|
@ -227,10 +227,7 @@ class SetupController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $updateScriptExist) {
|
Option::set('version', config('app.version'));
|
||||||
// If there is no update script given
|
|
||||||
Option::set('version', config('app.version'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clear all compiled view files
|
// Clear all compiled view files
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ class SetupControllerTest extends TestCase
|
||||||
config(['options.new_option' => 'value']);
|
config(['options.new_option' => 'value']);
|
||||||
$this->post('/setup/update')->assertViewHas('tips');
|
$this->post('/setup/update')->assertViewHas('tips');
|
||||||
$this->assertEquals('value', option('new_option'));
|
$this->assertEquals('value', option('new_option'));
|
||||||
$this->assertEquals('3.1.1', option('version'));
|
$this->assertEquals('100.0.0', option('version'));
|
||||||
unlink(database_path("update_scripts/update-$current_version-to-100.0.0.php"));
|
unlink(database_path("update_scripts/update-$current_version-to-100.0.0.php"));
|
||||||
|
|
||||||
option(['version' => '3.0.0']); // Fake old version
|
option(['version' => '3.0.0']); // Fake old version
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user