Hashar has submitted this change and it was merged.
Change subject: Revert "Apply fixes from 4796af1fa7 to old php-lint Ant target"
......................................................................
Revert "Apply fixes from 4796af1fa7 to old php-lint Ant target"
That broke linting. I guess the tr \0 does not do what is expected.
Please try again by testing your change :)
This reverts commit 646df00eccd24146e8df16c0441b5a3d950db0e6
Change-Id: Ie2f9b26722e16e6f19b646ced074e9e09bada491
---
M jobs/_shared/build.xml
1 file changed, 12 insertions(+), 7 deletions(-)
Approvals:
Hashar: Verified; Looks good to me, approved
diff --git a/jobs/_shared/build.xml b/jobs/_shared/build.xml
index fce0b59..bb33f5e 100644
--- a/jobs/_shared/build.xml
+++ b/jobs/_shared/build.xml
@@ -486,8 +486,7 @@
</macrodef>
<!-- git-files-changed:
- Files changed in this revision, excluding deleted files and
non-php files.
- -z disables the shell escape git does by default with name-only
separates with null-byte instead of new line.
+ Find out uwhat file changed in git copy ${sourcedir} before HEAD
Example:
ant git-files-changed -Dsourcedir=/var/www/mediawiki
@@ -495,7 +494,7 @@
<target name="git-files-changed">
<exec executable="git" dir="${sourcedir}" failonerror="true"
outputproperty="gitfileschanged">
- <arg line="diff HEAD^..HEAD --name-only -z --no-renames
--diff-filter=ACM" />
+ <arg line="diff --name-only HEAD^" />
</exec>
<echo>Files changed according to git:</echo>
<echo>--------------------------------------------------------------</echo>
@@ -507,7 +506,7 @@
outputproperty="gitphpfileschanged">
<arg value="-E" />
<arg value="\.(php|php5|inc|phtml)$" />
- </exec>
+ </exec>
<!-- find out files ending with .sql -->
<exec executable="grep"
failonerror="false"
@@ -516,15 +515,21 @@
outputproperty="gitsqlfileschanged">
<arg value="-E" />
<arg value="\.(sql)$" />
- </exec>
+ </exec>
<!-- Create a new property without newlines: -->
<exec executable="tr"
inputstring="${gitfileschanged}"
outputproperty="gitfileschangedinline">
- <arg value="\0" />
+ <arg value="\n" />
<arg value=" " />
- </exec>
+ </exec>
+
+ <!-- set a property whether any .sql file got changed -->
+ <condition property="gitsqlhaschanged" value="true"
else="false">
+ <equals arg1="${gitgrepsqlresult}" arg2="0" />
+ </condition>
+ <echo>.sql file changed? ${gitsqlhaschanged}</echo>
</target>
--
To view, visit https://gerrit.wikimedia.org/r/59812
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2f9b26722e16e6f19b646ced074e9e09bada491
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits