Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
8b5f4ccd
Commit
8b5f4ccd
authored
May 26, 2010
by
Jonathan H. Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing DBAL phing dependencies and version.
parent
5c263075
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
72 deletions
+59
-72
doctrine.php
bin/doctrine.php
+1
-1
build-dependencies.properties
build-dependencies.properties
+0
-5
build-dependencies.xml
build-dependencies.xml
+0
-62
build.xml
build.xml
+3
-4
Version.php
lib/Doctrine/DBAL/Version.php
+55
-0
No files found.
bin/doctrine.php
View file @
8b5f4ccd
...
...
@@ -30,7 +30,7 @@ if (file_exists($configFile)) {
$helperSet
=
(
$helperSet
)
?:
new
\Symfony\Components\Console\Helper\HelperSet
();
$cli
=
new
\Symfony\Components\Console\Application
(
'Doctrine Command Line Interface'
,
Doctrine\
Common
\Version
::
VERSION
);
$cli
=
new
\Symfony\Components\Console\Application
(
'Doctrine Command Line Interface'
,
Doctrine\
DBAL
\Version
::
VERSION
);
$cli
->
setCatchExceptions
(
true
);
$cli
->
setHelperSet
(
$helperSet
);
$cli
->
addCommands
(
array
(
...
...
build-dependencies.properties
deleted
100644 → 0
View file @
5c263075
dependencies
=
common
common.version
=
2.0.0-BETA1
common.srcdir
=
lib/Doctrine/Common
common.targetdir
=
lib/Doctrine/Common
build-dependencies.xml
deleted
100644 → 0
View file @
5c263075
<?xml version="1.0"?>
<project
name=
"Doctrine Dependency Management"
default=
"resolve-dependencies"
basedir=
"."
>
<property
file=
"build-dependencies.properties"
/>
<property
name=
"download.dir"
value=
"download"
/>
<target
name=
"resolve-dependencies"
description=
"Resolves the project dependencies."
>
<echo
message=
"Resolving dependencies"
/>
<foreach
list=
"${dependencies}"
param=
"dependency"
target=
"resolve-dependency"
/>
</target>
<target
name=
"resolve-dependency"
>
<fail
unless=
"${dependency}.version"
message=
"${dependency}.version not set."
/>
<fail
unless=
"${dependency}.srcdir"
message=
"${dependency}.srcdir not set."
/>
<fail
unless=
"${dependency}.targetdir"
message=
"${dependency}.targetdir not set."
/>
<property
name=
"dependency.version"
value=
"${${dependency}.version}"
/>
<property
name=
"dependency.srcdir"
value=
"${${dependency}.srcdir}"
/>
<property
name=
"dependency.targetdir"
value=
"${${dependency}.targetdir}"
/>
<echo
message=
"${dependency.targetdir}"
/>
<!--
Check out dependency. If ${dependency.targetdir} does not exist or versions dont match.
When done, place version info file into ${dependency.targetdir}.
-->
<available
file=
"${dependency.targetdir}"
type=
"dir"
property=
"target.dir.exists"
/>
<if>
<istrue
value=
"${target.dir.exists}"
/>
<then>
<property
file=
"${dependency.targetdir}/current-version.properties"
/>
</then>
</if>
<if>
<or>
<isfalse
value=
"${target.dir.exists}"
/>
<not><equals
arg1=
"${dependency.version}"
arg2=
"${current.version}"
/></not>
</or>
<then>
<echo
message=
"Fetching dependency '${dependency}' at version '${dependency.version}'."
/>
<delete
dir=
"${download.dir}/${dependency}"
includeemptydirs=
"true"
/>
<mkdir
dir=
"${download.dir}/${dependency}"
/>
<exec
command=
"git clone git://github.com/doctrine/${dependency}.git ${download.dir}/${dependency}"
/>
<exec
command=
"git checkout ${dependency.version}"
dir=
"${download.dir}/${dependency}"
/>
<delete
dir=
"${dependency.targetdir}"
includeemptydirs=
"true"
/>
<copy
todir=
"${dependency.targetdir}"
>
<fileset
dir=
"${download.dir}/${dependency}/${dependency.srcdir}"
>
<include
name=
"**"
/>
</fileset>
</copy>
<delete
file=
"${dependency.targetdir}/current-version.properties"
/>
<touch
file=
"${dependency.targetdir}/current-version.properties"
/>
<append
destFile=
"${dependency.targetdir}/current-version.properties"
text=
"current.version=${dependency.version}"
/>
<delete
dir=
"${download.dir}/${dependency}"
includeemptydirs=
"true"
/>
</then>
<else>
<echo
message=
"Dependency ${dependency} is available in the correct version: ${dependency.version}."
/>
</else>
</if>
</target>
</project>
build.xml
View file @
8b5f4ccd
...
...
@@ -5,8 +5,6 @@
-->
<project
name=
"Doctrine DBAL"
default=
"build"
basedir=
"."
>
<import
file=
"build-dependencies.xml"
/>
<taskdef
classname=
"phing.tasks.ext.d51PearPkg2Task"
name=
"d51pearpkg2"
/>
<taskdef
classname=
"NativePhpunitTask"
classpath=
"./tests/"
name=
"nativephpunit"
/>
...
...
@@ -30,7 +28,7 @@
<!--
Fileset for the sources of the Doctrine Common dependency.
-->
<fileset
id=
"common-sources"
dir=
"./lib"
>
<fileset
id=
"common-sources"
dir=
"./lib
/vendor/doctrine-common/lib
"
>
<include
name=
"Doctrine/Common/**"
/>
</fileset>
...
...
@@ -64,7 +62,6 @@
Prepare the new build directories after cleaning
-->
<target
name=
"prepare"
depends=
"clean"
>
<phingcall
target=
"resolve-dependencies"
/>
<echo
msg=
"Creating build directory: ${build.dir}"
/>
<mkdir
dir=
"${build.dir}"
/>
<echo
msg=
"Creating distribution directory: ${dist.dir}"
/>
...
...
@@ -92,6 +89,8 @@
<copy
todir=
"${build.dir}/dbal/bin"
>
<fileset
refid=
"bin-scripts"
/>
</copy>
<exec
command=
"sed 's/${version}-DEV/${version}/' ${build.dir}/dbal/Doctrine/DBAL/Version.php > ${build.dir}/dbal/Doctrine/DBAL/Version2.php"
passthru=
"true"
/>
<exec
command=
"mv ${build.dir}/dbal/Doctrine/DBAL/Version2.php ${build.dir}/dbal/Doctrine/DBAL/Version.php"
passthru=
"true"
/>
</target>
<target
name=
"build"
depends=
"test, build-dbal"
/>
...
...
lib/Doctrine/DBAL/Version.php
0 → 100644
View file @
8b5f4ccd
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace
Doctrine\DBAL
;
/**
* Class to store and retrieve the version of Doctrine
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class
Version
{
/**
* Current Doctrine Version
*/
const
VERSION
=
'2.0.0BETA2-DEV'
;
/**
* Compares a Doctrine version with the current one.
*
* @param string $version Doctrine version to compare.
* @return int Returns -1 if older, 0 if it is the same, 1 if version
* passed as argument is newer.
*/
public
static
function
compare
(
$version
)
{
$currentVersion
=
str_replace
(
' '
,
''
,
strtolower
(
self
::
VERSION
));
$version
=
str_replace
(
' '
,
''
,
$version
);
return
version_compare
(
$version
,
$currentVersion
);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment