Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add apidoc generation command.

  • Loading branch information...
commit fe851ef87c1e16f797d795018f4b752f90fcf86b 1 parent f88a035
@beberlei beberlei authored
View
3  .gitignore
@@ -1,2 +1,5 @@
pages/build
*.pyc
+source
+api
+vendor
View
42 bin/build-apidocs.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Use the projects.yml and build apidocs for all projects+versions
+ *
+ * Apigen (www.apigen.org) is required.
+ */
+
+require_once __DIR__ . "/../vendor/.composer/autoload.php";
+
+$output = $argv[1];
+if (!is_dir($output)) {
+ echo "First argument has to be a directory.\n";
+ exit(1);
+}
+
+$data = \Symfony\Component\Yaml\Yaml::parse(file_get_contents(__DIR__ . "/../pages/source/projects.yml"));
+
+foreach ($data as $project => $projectDetails) {
+ foreach ($projectDetails['versions'] as $version => $versionData) {
+
+ if (isset($versionData['browse_source_link'])) {
+ $checkout = end(array_keys($versionData['releases']));
+ $url = $versionData['browse_source_link'];
+ $path = "source/$project$version";
+ $updateSourceCmd = sprintf("rm -rf %s && git clone %s.git %s && cd %s && git checkout %s", $path, $url, $path, $path, $checkout);
+
+ chdir(__DIR__ . "/../");
+ echo "Executing $updateSourceCmd\n";
+ shell_exec($updateSourceCmd);
+
+ $directory = $output . "/" . $versionData['source_path'];
+ echo "Creating directory: $directory\n";
+ mkdir($directory);
+
+ chdir(__DIR__ . "/../");
+ $apiDocs = sprintf("apigen -s %s -d %s/%s", $versionData['api_source_path'], $output, $versionData['source_path'] );
+ echo "Generating API Docs: $apiDocs\n";
+ shell_exec($apiDocs);
+ }
+ }
+}
+
View
6 composer.json
@@ -0,0 +1,6 @@
+{
+ "name": "doctrine/website",
+ "require": {
+ "symfony/yaml": "*"
+ }
+}
View
9 composer.lock
@@ -0,0 +1,9 @@
+{
+ "hash": "6f6b13187be7602e136abe238340170a",
+ "packages": [
+ {
+ "package": "symfony\/yaml",
+ "version": "2.1.0-dev"
+ }
+ ]
+}
View
10 pages/source/projects.yml
@@ -39,7 +39,7 @@ orm:
version_file: source/orm2.0/lib/Doctrine/ORM/Version.php
api_source_path: source/orm2.0/lib/Doctrine/ORM
source_path: source/orm2.0
- update_source_command: 'rm -rf source/orm2.0 && git clone git://github.com/doctrine/doctrine2.git source/orm2.0 && cd source/orm2.0 && git submodule init && git submodule update && git checkout 2.0.x'
+ update_source_command: 'rm -rf source/orm2.0 && git clone git://github.com/doctrine/doctrine2.git source/orm2.0 && cd source/orm2.0 && git checkout 2.0.x'
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm'
svn_checkout_command: 'svn co http://svn.github.com/doctrine/doctrine2.git doctrine2-orm'
pear_install_command: 'pear install doctrine/DoctrineORM'
@@ -118,12 +118,12 @@ orm:
version_file: source/orm2.1/lib/Doctrine/ORM/Version.php
api_source_path: source/orm2.1/lib/Doctrine/ORM
source_path: source/orm2.1
- update_source_command: 'rm -rf source/orm2.1 && git clone git://github.com/doctrine/doctrine2.git source/orm2.1 && cd source/orm2.1 && git submodule init && git submodule update && git checkout master'
+ update_source_command: 'rm -rf source/orm2.1 && git clone git://github.com/doctrine/doctrine2.git source/orm2.1 && cd source/orm2.1 && git submodule update && git checkout 2.1.x'
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm'
svn_checkout_command: 'svn co http://svn.github.com/doctrine/doctrine2.git doctrine2-orm'
stability: stable
issues_link: 'http://www.doctrine-project.org/jira/browse/DDC'
- browse_source_link: 'http://github.com/doctrine/doctrine2/tree/master/lib/Doctrine/ORM'
+ browse_source_link: 'http://github.com/doctrine/doctrine2'
upgrade_file_path: source/orm2.1/UPGRADE_TO_2_1
releases:
2.1.0BETA1:
@@ -174,12 +174,12 @@ orm:
version_file: source/orm2.2/lib/Doctrine/ORM/Version.php
api_source_path: source/orm2.2/lib/Doctrine/ORM
source_path: source/orm2.2
- update_source_command: 'rm -rf source/orm2.2 && git clone git://github.com/doctrine/doctrine2.git source/orm2.2 && cd source/orm2.1 && git submodule init && git submodule update && git checkout master'
+ update_source_command: 'rm -rf source/orm2.2 && git clone git://github.com/doctrine/doctrine2.git source/orm2.2 && cd source/orm2.2 && git checkout 2.2'
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm'
svn_checkout_command: 'svn co http://svn.github.com/doctrine/doctrine2.git doctrine2-orm'
stability: stable
issues_link: 'http://www.doctrine-project.org/jira/browse/DDC'
- browse_source_link: 'http://github.com/doctrine/doctrine2/tree/master/lib/Doctrine/ORM'
+ browse_source_link: 'http://github.com/doctrine/doctrine2'
upgrade_file_path: source/orm2.2/UPGRADE_TO_2_2
releases:
2.2.0BETA1:
Please sign in to comment.
Something went wrong with that request. Please try again.