Merge pull request #516 from marc1706/ticket/513
[ticket/513] Add build script
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -8,5 +8,4 @@ phpunit.xml.* export-ignore
|
|||||||
README.md export-ignore
|
README.md export-ignore
|
||||||
git-tools/ export-ignore
|
git-tools/ export-ignore
|
||||||
.coveralls.yml export-ignore
|
.coveralls.yml export-ignore
|
||||||
composer.phar export-ignore
|
build.xml export-ignore
|
||||||
composer.lock export-ignore
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
/.idea/*
|
/.idea/*
|
||||||
/tests/test_config.php
|
/tests/test_config.php
|
||||||
/vendor/
|
/vendor/
|
||||||
|
/build/
|
||||||
|
|||||||
134
build.xml
Normal file
134
build.xml
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="Extension Builder" description="Builds an extension.zip from a git repository" default="all">
|
||||||
|
<property name="vendor-name" value="board3" />
|
||||||
|
<property name="extension-name" value="portal" />
|
||||||
|
<!--
|
||||||
|
Only set this to "true" if you have dependencies in the composer.json,
|
||||||
|
otherwise use "false".
|
||||||
|
-->
|
||||||
|
<property name="has-dependencies" value="true" />
|
||||||
|
|
||||||
|
<target name="clean-package">
|
||||||
|
<!--
|
||||||
|
Remove some unnecessary files/directories
|
||||||
|
${dir}/ is the folder of your extension, e.g. ext/nickvergessen/newspage/
|
||||||
|
-->
|
||||||
|
<delete dir="${dir}/tests" />
|
||||||
|
<delete dir="${dir}/travis" />
|
||||||
|
<delete dir="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/src/Nickvergessen/TrimMessage/Tests" />
|
||||||
|
<delete dir="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/tests" />
|
||||||
|
|
||||||
|
<delete file="${dir}/.gitignore" />
|
||||||
|
<delete file="${dir}/.gitattributes" />
|
||||||
|
<delete file="${dir}/.travis.yml" />
|
||||||
|
<delete file="${dir}/build.xml" />
|
||||||
|
<delete file="${dir}/composer.lock" />
|
||||||
|
<delete file="${dir}/composer.phar" />
|
||||||
|
<delete file="${dir}/phpunit.xml.dist" />
|
||||||
|
<delete file="${dir}/README.md" />
|
||||||
|
<delete file="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/composer.lock" />
|
||||||
|
<delete file="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/composer.phar" />
|
||||||
|
<delete file="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/phpunit.xml" />
|
||||||
|
<delete file="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/README.md" />
|
||||||
|
<delete file="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/.gitignore" />
|
||||||
|
<delete file="${dir}/vendor/nickvergessen/phpbb-tool-trimmessage/.travis.yml" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
TODO: DO NOT EDIT BELOW THIS LINE!!!!
|
||||||
|
-->
|
||||||
|
|
||||||
|
<property name="version" value="HEAD" override="true" />
|
||||||
|
<property name="build-directory" value="build" override="true" />
|
||||||
|
<property name="package-directory" value="${build-directory}/package/${vendor-name}/${extension-name}" />
|
||||||
|
<property name="phpbb-root" value="${build-directory}/../../../../../" />
|
||||||
|
|
||||||
|
<!-- These are the main targets which you will probably want to use -->
|
||||||
|
<target name="all" depends="prepare-structure,package" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Clean up the build directory
|
||||||
|
-->
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${build-directory}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="composer">
|
||||||
|
<exec dir="${build-directory}/../"
|
||||||
|
command="php composer.phar install"
|
||||||
|
passthru="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test" depends="clean,composer">
|
||||||
|
<exec dir="${phpbb-root}"
|
||||||
|
command="phpBB/vendor/bin/phpunit
|
||||||
|
-c phpBB/ext/${vendor-name}/${extension-name}/"
|
||||||
|
passthru="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test-slow" depends="clean,composer">
|
||||||
|
<exec dir="${phpbb-root}"
|
||||||
|
command="phpBB/vendor/bin/phpunit
|
||||||
|
-c phpBB/ext/${vendor-name}/${extension-name}/
|
||||||
|
--group slow"
|
||||||
|
passthru="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Recreate the necessary folders
|
||||||
|
-->
|
||||||
|
<target name="prepare-structure" depends="clean,composer,test,test-slow">
|
||||||
|
<mkdir dir="${build-directory}" />
|
||||||
|
<mkdir dir="${build-directory}/checkout" />
|
||||||
|
<mkdir dir="${build-directory}/package" />
|
||||||
|
<mkdir dir="${build-directory}/package/${vendor-name}" />
|
||||||
|
<mkdir dir="${build-directory}/package/${vendor-name}/${extension-name}" />
|
||||||
|
<mkdir dir="${build-directory}/upload" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The real packaging
|
||||||
|
-->
|
||||||
|
<target name="package">
|
||||||
|
<echo msg="Extracting ${version}" />
|
||||||
|
|
||||||
|
<phingcall target="git-checkout">
|
||||||
|
<property name="archive-version" value="${version}" />
|
||||||
|
</phingcall>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<equals arg1="${has-dependencies}" arg2="1" />
|
||||||
|
<then>
|
||||||
|
<exec dir="${package-directory}" command="php composer.phar install --no-dev"
|
||||||
|
checkreturn="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<phingcall target="clean-package">
|
||||||
|
<property name="dir" value="${package-directory}" />
|
||||||
|
</phingcall>
|
||||||
|
|
||||||
|
<phingcall target="wrap-package">
|
||||||
|
<property name="destination-filename" value="${build-directory}/upload/${vendor-name}_${extension-name}-${version}" />
|
||||||
|
</phingcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Checkout a given version and install/clean the dependencies
|
||||||
|
-->
|
||||||
|
<target name="git-checkout">
|
||||||
|
<echo msg="Getting archive for ${archive-version}" />
|
||||||
|
|
||||||
|
<exec command="git archive ${archive-version} --format zip --output ${build-directory}/checkout/${archive-version}.zip"
|
||||||
|
checkreturn="true" />
|
||||||
|
<unzip file="${build-directory}/checkout/${archive-version}.zip" todir="${package-directory}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Create the zip and tar ball
|
||||||
|
-->
|
||||||
|
<target name="wrap-package">
|
||||||
|
<echo msg="Creating archives (${vendor-name}/${extension-name} ${version})" />
|
||||||
|
<zip basedir="${build-directory}/package/" destfile="${destination-filename}.zip" />
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
58
composer.lock
generated
58
composer.lock
generated
@@ -153,12 +153,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpbb/epv.git",
|
"url": "https://github.com/phpbb/epv.git",
|
||||||
"reference": "77b7200b834ff97d2f1e5c07259d8f95073dbaf0"
|
"reference": "75df9936ffbb8f05a1351cf622cf6f41c7d2d9f2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpbb/epv/zipball/77b7200b834ff97d2f1e5c07259d8f95073dbaf0",
|
"url": "https://api.github.com/repos/phpbb/epv/zipball/75df9936ffbb8f05a1351cf622cf6f41c7d2d9f2",
|
||||||
"reference": "77b7200b834ff97d2f1e5c07259d8f95073dbaf0",
|
"reference": "75df9936ffbb8f05a1351cf622cf6f41c7d2d9f2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -194,7 +194,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A extension validator for phpBB extensions. Extensions are required to pass the validator when submitted to the extension database.",
|
"description": "A extension validator for phpBB extensions. Extensions are required to pass the validator when submitted to the extension database.",
|
||||||
"time": "2015-02-08 09:13:16"
|
"time": "2015-02-12 12:13:06"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sensiolabs/ansi-to-html",
|
"name": "sensiolabs/ansi-to-html",
|
||||||
@@ -242,17 +242,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v2.6.4",
|
"version": "v2.6.5",
|
||||||
"target-dir": "Symfony/Component/Console",
|
"target-dir": "Symfony/Component/Console",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Console.git",
|
"url": "https://github.com/symfony/Console.git",
|
||||||
"reference": "e44154bfe3e41e8267d7a3794cd9da9a51cfac34"
|
"reference": "53f86497ccd01677e22435cfb7262599450a90d1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Console/zipball/e44154bfe3e41e8267d7a3794cd9da9a51cfac34",
|
"url": "https://api.github.com/repos/symfony/Console/zipball/53f86497ccd01677e22435cfb7262599450a90d1",
|
||||||
"reference": "e44154bfe3e41e8267d7a3794cd9da9a51cfac34",
|
"reference": "53f86497ccd01677e22435cfb7262599450a90d1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -261,6 +261,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/log": "~1.0",
|
"psr/log": "~1.0",
|
||||||
"symfony/event-dispatcher": "~2.1",
|
"symfony/event-dispatcher": "~2.1",
|
||||||
|
"symfony/phpunit-bridge": "~2.7",
|
||||||
"symfony/process": "~2.1"
|
"symfony/process": "~2.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@@ -295,26 +296,29 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Console Component",
|
"description": "Symfony Console Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2015-01-25 04:39:26"
|
"time": "2015-03-13 17:37:22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v2.6.4",
|
"version": "v2.6.5",
|
||||||
"target-dir": "Symfony/Component/Finder",
|
"target-dir": "Symfony/Component/Finder",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Finder.git",
|
"url": "https://github.com/symfony/Finder.git",
|
||||||
"reference": "16513333bca64186c01609961a2bb1b95b5e1355"
|
"reference": "bebc7479c566fa4f14b9bcef9e32e719eabec74e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Finder/zipball/16513333bca64186c01609961a2bb1b95b5e1355",
|
"url": "https://api.github.com/repos/symfony/Finder/zipball/bebc7479c566fa4f14b9bcef9e32e719eabec74e",
|
||||||
"reference": "16513333bca64186c01609961a2bb1b95b5e1355",
|
"reference": "bebc7479c566fa4f14b9bcef9e32e719eabec74e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/phpunit-bridge": "~2.7"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@@ -342,26 +346,29 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Finder Component",
|
"description": "Symfony Finder Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2015-01-03 08:01:59"
|
"time": "2015-03-12 10:28:44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v2.6.4",
|
"version": "v2.6.5",
|
||||||
"target-dir": "Symfony/Component/Process",
|
"target-dir": "Symfony/Component/Process",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Process.git",
|
"url": "https://github.com/symfony/Process.git",
|
||||||
"reference": "ecfc23e89d9967999fa5f60a1e9af7384396e9ae"
|
"reference": "4d717f34f3d1d6ab30fbe79f7132960a27f4a0dc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Process/zipball/ecfc23e89d9967999fa5f60a1e9af7384396e9ae",
|
"url": "https://api.github.com/repos/symfony/Process/zipball/4d717f34f3d1d6ab30fbe79f7132960a27f4a0dc",
|
||||||
"reference": "ecfc23e89d9967999fa5f60a1e9af7384396e9ae",
|
"reference": "4d717f34f3d1d6ab30fbe79f7132960a27f4a0dc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/phpunit-bridge": "~2.7"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@@ -389,26 +396,29 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Process Component",
|
"description": "Symfony Process Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2015-01-25 04:39:26"
|
"time": "2015-03-12 10:28:44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v2.6.4",
|
"version": "v2.6.5",
|
||||||
"target-dir": "Symfony/Component/Yaml",
|
"target-dir": "Symfony/Component/Yaml",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/Yaml.git",
|
"url": "https://github.com/symfony/Yaml.git",
|
||||||
"reference": "60ed7751671113cf1ee7d7778e691642c2e9acd8"
|
"reference": "0cd8e72071e46e15fc072270ae39ea1b66b10a9d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/60ed7751671113cf1ee7d7778e691642c2e9acd8",
|
"url": "https://api.github.com/repos/symfony/Yaml/zipball/0cd8e72071e46e15fc072270ae39ea1b66b10a9d",
|
||||||
"reference": "60ed7751671113cf1ee7d7778e691642c2e9acd8",
|
"reference": "0cd8e72071e46e15fc072270ae39ea1b66b10a9d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/phpunit-bridge": "~2.7"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@@ -436,7 +446,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Yaml Component",
|
"description": "Symfony Yaml Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2015-01-25 04:39:26"
|
"time": "2015-03-12 10:28:44"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
Reference in New Issue
Block a user