Updates the version of the bundle
@param string $bundle The bundle name
549478
private function UpdateBundleVersion($bundle)
    {
        $instBundle = InstalledBundle::Schema()->ByBundle($bundle);
        if (!$instBundle)
        {
            $instBundle = new InstalledBundle();
        }
        $instBundle->SetVersion($this->installedBundles[$bundle]);
        $instBundle->SetBundle($bundle);
        $instBundle->SetLastUpdate(Date::Now());
        $instBundle->Save();
    }
224923
public function update($package = null)
    {
        if (! is_null($package)) {
            $package = '"'.$package.'"';
        }
        $process = $this->getProcess();
        $process->setCommandLine(trim($this->findComposer().' update '.$package));
        $process->run($this->output);
    }
1218397
protected function setVersion($version) {
    if ($version == self::V3 || $version == self::V4 || $version == self::V5) {
      $this->version = $version;
    }
    else {
      throw new Exception('An invalid UUID version was specified.');
    }
  }
1349044
public function update($config)
    {
        config(['version' => $config]);

        $this->yaml->saveAsYaml($config, $this->configFile);
    }
1305911
public function updateAll(UpdateSettingRequest $request, System $bundle)
    {
        if ($request->isReset() === false) {
            $bundle = $this->repository->getBundle($bundle);
            $data = $request->json();
            foreach ($data as $name => $value) {
                if ($bundle->hasName($name) && $value != $bundle[$name]) {
                    $bundle[$name] = $value;
                }
            }
        }
        $bundle->persist();

        return $this->sendResponse($bundle, 'Setting updated successfully.');
    }
1034981
public function updateAction(Asset $asset): void
    {
        $this->assetRepository->update($asset);
        $this->addFlashMessage('assetHasBeenUpdated', '', Message::SEVERITY_OK, [htmlspecialchars($asset->getLabel())]);
        $this->redirect('index');
    }
157982
public function loadBundle($bundleName)
	{
		if (!preg_match('#^[A-Z][A-Za-z0-9]+$#D', $bundleName))
		{
			throw new InvalidArgumentException("Invalid bundle name '" . $bundleName . "'");
		}

		$className = __CLASS__ . '\\Bundles\\' . $bundleName;

		$bundle = new $className;
		$bundle->configure($this);
	}
739033
public function setPackage($package)
    {
        if ($package === $this->package) {
            return;
        }

        $this->package = $package;
        $this->packageOverridden = false;
    }
435324
public function update(\Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $initial, 
			\Composer\Package\PackageInterface $target) {
		if (!$this->needsUpdate($initial)) {
			//add the new version of the module to the composer.lock
			$repo->removePackage($initial);
			if (!$repo->hasPackage($target)) {
				$repo->addPackage(clone $target);
			}
			return;
		}
				
    	$this->moveBackResources($initial);
				
		parent::update($repo, $initial, $target);
		
		$this->removeResources($target);
		$this->installResources($target);
	}
249065
public function upgrade( $version ) {

		if ( $version < 1 ) {
			// Upgrade from version 0 (prior to Pressbooks\Taxonomy class) to version 1 (simplified chapter types)
			$this->upgradeChapterTypes();
			flush_rewrite_rules( false );
		}
		if ( $version < 2 ) {
			$this->insertTerms(); // Re-trigger
		}
		if ( $version < 3 ) {
			$this->upgradeLicenses();
		}
		if ( $version < 4 ) {
			$this->differentiatePublicDomain();
		}
	}
752254
def bundle(context, name):
    """"""
    if context.obj['db'].bundle(name):
        click.echo(click.style('bundle name already exists', fg='yellow'))
        context.abort()
    new_bundle = context.obj['db'].new_bundle(name)
    context.obj['db'].add_commit(new_bundle)

    # add default version
    new_version = context.obj['db'].new_version(created_at=new_bundle.created_at)
    new_version.bundle = new_bundle
    context.obj['db'].add_commit(new_version)

    click.echo(click.style(f"new bundle added: {new_bundle.name} ({new_bundle.id})", fg='green'))
107257
@Override
	public void storeBundle(String bundleName, JoinableResourceBundleContent bundleResourcesContent) {

		// Text version
		String bundleContent = bundleResourcesContent.getContent().toString();
		storeBundle(bundleName, bundleContent, false, textDirPath);

		// binary version
		storeBundle(bundleName, bundleContent, true, gzipDirPath);
	}
969052
public function setValue($version = 0.0)
    {
        $this->version = $version;
        $major = floor($version);
        $minor = ($version - $major) * 100;
        $strValue = sprintf('%02.0f%02.0f', $major, $minor);
        $this->components = strlen($strValue);
        $this->bytes = $strValue;
    }
618519
private function UpdateBundleVersions()
    {
        $this->ClearInstalledBundles();
        $bundles = PathUtil::Bundles();
        foreach ($bundles as $bundle)
        {
            if (!array_key_exists($bundle, $this->failedBundles))
            {
                $this->UpdateBundleVersion($bundle);
            }    
        }
    }
941280
public function updateTags($tags)
    {
        $app = Application::getFacadeApplication();
        $tags = self::cleanTags($tags);
        $this->fvTags = $tags;
        $this->save();
        $this->logVersionUpdate(self::UT_TAGS);
        $fve = new FileVersionEvent($this);
        $app->make(EventDispatcherInterface::class)->dispatch('on_file_version_update_tags', $fve);
    }
229950
private function updateComponentVersions(array $release)
    {
        foreach ($release as $key => $releaseComponent)
        {
            $component = $this->getComponentComposer($this->rootPath(), $key);

            $this->addToComponentManifest($releaseComponent['version'], $component);
            foreach ((array) $component['entry'] as $entry) {
                $entryUpdated = $this->updateComponentVersionConstant(
                    $releaseComponent['version'],
                    $component['path'],
                    $entry
                );
            }

            if ($component['id'] !== 'google-cloud') {
                $this->updateComponentVersionFile($releaseComponent['version'], $component);
                $this->updateComposerReplacesVersion($releaseComponent['version'], $component);
            }
        }
    }
1074428
public static function routes($bundle)
		{
			if (static::routed($bundle)) {
				return;
			}

			$path = static::path($bundle) . 'routes.php';

			// By setting the bundle property on the router, the router knows what
			// value to replace the (:bundle) place-holder with when the bundle
			// routes are added, keeping the routes flexible.
			Router::$bundle = static::option($bundle, 'handles');

			if (!static::routed($bundle) && File::exists($path)) {
				static::$routed[] = $bundle;
				require $path;
			}
		}