#363 - 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 b43fe6c65f
commit fdc20b9071

View File

@@ -522,10 +522,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>