Google\Cloud\Dev\Release\Command\Release::addToManifest PHP Method

addToManifest() private method

private addToManifest ( $version )
    private function addToManifest($version)
    {
        $manifest = $this->getManifest();
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new RuntimeException('Could not decode manifest json');
        }
        array_unshift($manifest['versions'], 'v' . $version);
        $content = json_encode($manifest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n";
        $result = file_put_contents($this->getManifestPath(), $content);
        if (!$result) {
            throw new RuntimeException('File write failed');
        }
    }