Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Commit 3c260ea

Browse files
authored
Merge pull request #9 from shochdoerfer/feature/task-params
Add build properties to be able to pass configuration options to the task
2 parents 880ea09 + d04c817 commit 3c260ea

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ Import the default build.xml to let Phing know about the Security Checker task:
2727
<import file="vendor/bitexpert/phing-securitychecker/build.xml" />
2828
```
2929

30+
If you imported the default build.xml, you are able to define the lock file
31+
path as well the as the webservice endpoint by defining two properties
32+
in your main build.xml file:
33+
34+
```xml
35+
<property name="securitychecker.lockfile" value="composer.lock" />
36+
<property name="securitychecker.endpoint" value="https://security.sensiolabs.org/check_lock" />
37+
```
38+
3039
Or define the securitychecker task on your own:
3140

3241
```xml

build.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@
44
<taskdef name="securitychecker" classpath="${phing.dir.securitychecker}/src" classname="bitExpert\Phing\SecurityChecker\SecurityCheckerTask" />
55

66
<target name="security:check">
7-
<securitychecker lockfile="${phing.dir}/composer.lock" />
7+
<if>
8+
<or>
9+
<not>
10+
<isset property="securitychecker.lockfile" />
11+
</not>
12+
<equals arg1="${securitychecker.lockfile}" arg2="" trim="true" />
13+
</or>
14+
<then>
15+
<property name="securitychecker.lockfile" value="${phing.dir}/composer.lock" override="true" />
16+
</then>
17+
</if>
18+
19+
<echo msg="Lockfile: ${securitychecker.lockfile}"/>
20+
<echo msg="Endpoint: ${securitychecker.endpoint}"/>
21+
22+
<securitychecker lockfile="${securitychecker.lockfile}" endpoint="${securitychecker.endpoint}" />
823
</target>
924
</project>

0 commit comments

Comments
 (0)