[Pkg-owncloud-commits] [php-sabredav] 157/163: Removed phing and created super simple build script.
David Prévot
taffit at moszumanska.debian.org
Tue May 20 18:55:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag upstream/2.0.0_beta1
in repository php-sabredav.
commit b901c4049d84dc3bd0459b54b2dbbb3549df6c0a
Author: Evert Pot <me at evertpot.com>
Date: Thu May 15 20:04:11 2014 -0400
Removed phing and created super simple build script.
---
ChangeLog | 4 ++
bin/build.php | 138 ++++++++++++++++++++++++++++++++++++++++++++++
build.xml | 83 ----------------------------
composer.json | 5 +-
lib/Sabre/DAV/Version.php | 2 +-
5 files changed, 145 insertions(+), 87 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 300be9c..cd840de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+1.7.13-stable (????-??-??)
+ * Changed: Removed phing and went with a custom build script for now.
+
1.7.12-stable (2014-05-15)
* Updated: Issue #439. Lots of updates in PATCH support. The
Sabre_DAV_PartialUpdate_IFile interface is now deprecated and will be
@@ -12,6 +15,7 @@
collection.
* Fixed: Issue #393: PATCH request with missing end-range was handled
incorrectly.
+ * Added: Sabre_DAV_Exception_LengthRequired to omit 411 errors.
1.7.11-stable (2014-02-26)
* The zip release ships with sabre/vobject 2.1.3.
diff --git a/bin/build.php b/bin/build.php
new file mode 100644
index 0000000..0d7001a
--- /dev/null
+++ b/bin/build.php
@@ -0,0 +1,138 @@
+<?php
+
+$tasks = [
+
+ 'buildzip' => [
+ 'init', 'test', 'clean',
+ ],
+ 'markrelease' => [
+ 'init', 'test', 'clean',
+ ],
+ 'clean' => [],
+ 'test' => [
+ 'composerupdate',
+ ],
+ 'init' => [],
+ 'composerupdate' => [],
+ ];
+
+$default = 'buildzip';
+
+$baseDir = __DIR__ . '/../';
+chdir($baseDir);
+
+$currentTask = $default;
+if ($argc > 1) $currentTask = $argv[1];
+$version = null;
+if ($argc > 2) $version = $argv[2];
+
+if (!isset($tasks[$currentTask])) {
+ echo "Task not found: ", $currentTask, "\n";
+ die(1);
+}
+
+// Creating the dependency graph
+$newTaskList = [];
+$oldTaskList = [$currentTask => true];
+
+while(count($oldTaskList)>0) {
+
+ foreach($oldTaskList as $task=>$foo) {
+
+ if (!isset($tasks[$task])) {
+ echo "Dependency not found: " . $task, "\n";
+ die(1);
+ }
+ $dependencies = $tasks[$task];
+
+ $fullFilled = true;
+ foreach($dependencies as $dependency) {
+ if (isset($newTaskList[$dependency])) {
+ // Already in the fulfilled task list.
+ continue;
+ } else {
+ $oldTaskList[$dependency] = true;
+ $fullFilled = false;
+ }
+
+ }
+ if ($fullFilled) {
+ unset($oldTaskList[$task]);
+ $newTaskList[$task] = 1;
+ }
+
+ }
+
+}
+
+foreach(array_keys($newTaskList) as $task) {
+
+ echo "task: " . $task, "\n";
+ call_user_func($task);
+ echo "\n";
+
+}
+
+function init() {
+
+ global $version;
+ if (!$version) {
+ include __DIR__ . '/../vendor/autoload.php';
+ $version = Sabre_DAV_Version::VERSION;
+ }
+
+ echo " Building sabre/dav " . $version, "\n";
+
+}
+
+function clean() {
+
+ global $baseDir;
+ echo " Removing build files\n";
+ $outputDir = $baseDir . '/build/SabreDAV';
+ if (is_dir($outputDir)) {
+ system('rm -r ' . $baseDir . '/build/SabreDAV');
+ }
+
+}
+
+function composerupdate() {
+
+ return;
+ global $baseDir;
+ echo " Updating composer packages to latest version\n\n";
+ system('cd ' . $baseDir . '; composer update --dev');
+}
+
+function test() {
+
+ return;
+ global $baseDir;
+
+ echo " Running all unittests.\n";
+ echo " This may take a while.\n\n";
+ system(__DIR__ . '/phpunit --configuration ' . $baseDir . '/tests/phpunit.xml --stop-on-failure', $code);
+ if ($code != 0) {
+ echo "PHPUnit reported error code $code\n";
+ die(1);
+ }
+
+}
+
+function buildzip() {
+
+ global $baseDir, $version;
+ echo " Asking composer to download sabre/dav $version\n\n";
+ system("composer create-project --no-dev sabre/dav build/SabreDAV $version", $code);
+ if ($code!==0) {
+ echo "Composer reported error code $code\n";
+ }
+ // <zip destfile="build/SabreDAV-${sabredav.version}.zip" basedir="build/SabreDAV" prefix="SabreDAV/" />
+
+ echo "\n";
+ echo "Zipping the sabredav distribution\n\n";
+ system('cd build; zip -qr sabredav-' . $version . '.zip SabreDAV');
+
+ echo "Done.";
+
+}
diff --git a/build.xml b/build.xml
deleted file mode 100644
index b1f57cd..0000000
--- a/build.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<project name="SabreDAV" default="buildzip" basedir=".">
-
- <!-- Any default properties -->
- <property file="build.properties" />
-
- <!-- Where to write api documentation -->
- <property name="sabredav.apidocspath" value="docs/api" />
-
- <target name="buildzip" depends="init, test, clean">
- <mkdir dir="build" />
- <echo>Running composer</echo>
- <exec command="composer create-project --no-dev sabre/dav build/SabreDAV ${sabredav.version}" checkreturn="false" passthru="1" />
- <zip destfile="build/SabreDAV-${sabredav.version}.zip" basedir="build/SabreDAV" prefix="SabreDAV/" />
- </target>
-
- <target name="clean" depends="init">
- <echo msg="Removing build files (cleaning up distribution)" />
- <delete dir="docs/api" />
- <delete dir="build" />
- </target>
-
- <target name="markrelease" depends="init,clean,test">
- <echo>Creating Git release tag</echo>
- <exec command="git tag ${sabredav.version}" checkreturn="false" passthru="1" />
- </target>
-
- <target name="test">
- <phpunit haltonfailure="1" haltonerror="1" bootstrap="tests/bootstrap.php" haltonskipped="1" printsummary="1">
- <batchtest>
- <fileset dir="tests">
- <include name="**/*.php"/>
- </fileset>
- </batchtest>
- </phpunit>
- </target>
-
- <target name="apidocs" depends="init">
-
- <echo>Creating api documentation using PHP documentor</echo>
- <echo>Writing to ${sabredav.apidocspath}</echo>
- <phpdoc title="SabreDAV API documentation"
- destdir="${sabredav.apidocspath}"
- sourcecode="false"
- output="HTML:frames:phphtmllib">
-
- <fileset dir="./lib">
- <include name="**/*.php" />
- </fileset>
- <projdocfileset dir=".">
- <include name="ChangeLog" />
- <include name="LICENSE" />
- </projdocfileset>
-
- </phpdoc>
-
- </target>
-
- <target name="init">
-
- <!-- This sets SabreDAV version information -->
- <adhoc-task name="sabredav-version"><![CDATA[
-
- class SabreDAV_VersionTask extends Task {
-
- public function main() {
-
- include_once 'lib/Sabre/DAV/Version.php';
- $this->getProject()->setNewProperty('sabredav.version',Sabre_DAV_Version::VERSION);
- $this->getProject()->setNewProperty('sabredav.stability',Sabre_DAV_Version::STABILITY);
- $this->getProject()->setNewProperty('sabredav.ucstability',ucwords(Sabre_DAV_Version::STABILITY));
-
- }
-
- }
-
- ]]></adhoc-task>
- <sabredav-version />
- <echo>SabreDAV version ${sabredav.version}</echo>
-
- </target>
-
-</project>
diff --git a/composer.json b/composer.json
index 6f049d0..03fb934 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
"authors": [
{
"name": "Evert Pot",
- "email": "evert at rooftopsolutions.nl",
+ "email": "me at evertpot.com",
"homepage" : "http://evertpot.com/",
"role" : "Developer"
}
@@ -27,8 +27,7 @@
"ext-libxml" : "*"
},
"require-dev" : {
- "phpunit/phpunit" : "~4.0.0",
- "phing/phing" : "~2.4"
+ "phpunit/phpunit" : "~4.0.0"
},
"provide" : {
"evert/sabredav" : "1.7.*"
diff --git a/lib/Sabre/DAV/Version.php b/lib/Sabre/DAV/Version.php
index 208546d..93220f4 100644
--- a/lib/Sabre/DAV/Version.php
+++ b/lib/Sabre/DAV/Version.php
@@ -14,7 +14,7 @@ class Sabre_DAV_Version {
/**
* Full version number
*/
- const VERSION = '1.7.12';
+ const VERSION = '1.7.13';
/**
* Stability : alpha, beta, stable
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list