Set new version automatically

This commit is contained in:
Pig Fang 2019-04-22 22:56:24 +08:00
parent f8bba6b7b7
commit 7f58d92590
2 changed files with 2 additions and 5 deletions

View File

@ -227,10 +227,7 @@ class SetupController extends Controller
}
}
if (! $updateScriptExist) {
// If there is no update script given
Option::set('version', config('app.version'));
}
Option::set('version', config('app.version'));
// Clear all compiled view files
try {

View File

@ -215,7 +215,7 @@ class SetupControllerTest extends TestCase
config(['options.new_option' => 'value']);
$this->post('/setup/update')->assertViewHas('tips');
$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"));
option(['version' => '3.0.0']); // Fake old version