#365 - Conditionally update documentation and schema target permissions.

We now skip documentation and schema permission updates if these directories are not present on the remote server. Directories can be absent if a particular module does not ship with a schema or documentation.

Unconditional permission updates let find exit with a non-zero return code which causes the build to fail.
This commit is contained in:
Mark Paluch
2017-06-06 11:41:17 +02:00
parent 36c75b49f1
commit a10cb5e7da

View File

@@ -526,10 +526,24 @@
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<configuration> <!-- Prevent reformatting, wrap with CDATA -->
<commands>
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
<command>
<![CDATA[
if [ -d /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ]
then
find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;
fi
]]>
</command>
<command>
<![CDATA[
if [ -d /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ]
then
find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;
fi
]]>
</command>
</commands>
</configuration>
</execution>