Skip to content

Commit fdc20b9

Browse files
committed
#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.
1 parent b43fe6c commit fdc20b9

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

parent/pom.xml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,24 @@
522522
<goals>
523523
<goal>sshexec</goal>
524524
</goals>
525-
<configuration>
525+
<configuration> <!-- Prevent reformatting, wrap with CDATA -->
526526
<commands>
527-
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
528-
<command>find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;</command>
527+
<command>
528+
<![CDATA[
529+
if [ -d /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ]
530+
then
531+
find /var/www/domains/spring.io/www/htdocs/autorepo/schema/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;
532+
fi
533+
]]>
534+
</command>
535+
<command>
536+
<![CDATA[
537+
if [ -d /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ]
538+
then
539+
find /var/www/domains/spring.io/www/htdocs/autorepo/docs/${dist.id}/${project.version}/ ! -perm -g=w -exec chmod g+w {} \;
540+
fi
541+
]]>
542+
</command>
529543
</commands>
530544
</configuration>
531545
</execution>

0 commit comments

Comments
 (0)