public static function getCurrentVersion($update = true)
    {
        $extMan = new ExtensionManager(resolve('app'), resolve('files'));
        $packageName = self::CORE_PACKAGE;
        $version = 'Unknown';

        // Retrieve framework (Easel) package info.
        $core = $extMan->getExtension(str_replace('/', '-', self::CORE_PACKAGE), ['canvas-framework']);
        $version = $core->getVersion();
        $dist = $core->__get('dist');
        if (substr($version, 0, 4) === 'dev-') {
            $version .= ' '.substr($dist['reference'], 0, 12);
        }

        // Save to Canvas Settings
        if ($update) {
            $setting = Settings::updateOrCreate(
                ['setting_name' => 'canvas_version'],
                ['setting_value' => $version]
            );
        }

        return $version;
    }