Skip to content

Commit

Permalink
Support both old and new scheme, fix very old bug about pathing
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Dec 6, 2019
1 parent 977c3be commit d741790
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<property name="home" value="${zlux-app-server}"/>
<property name="buildRel" value="zlux-build"/>
<property name="build" value="${capstone}/zlux-build"/>
<condition name="instanceMode">
<condition property="instanceMode">
<isset property="env.INSTANCE_DIR"/>
</condition>
<!-- instanceMode is the new standard, non-instanceMode is for compatibility -->
Expand Down
8 changes: 4 additions & 4 deletions build_ng2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</target>

<target name="buildPlugin" depends="antPlugin" unless="build.xmlRan">
<property name="absolutePlugin" location="${pluginDir}/${plugin}"/>
<property name="absolutePlugin" location="${capstone}/zlux-app-server/lib/${plugin}"/>
<if>
<not>
<or>
Expand All @@ -114,18 +114,18 @@
</not>
<then>
<antcall target="npmInstall" unless:set="noInstall">
<param name="packagejson.Location" value="${pluginDir}/${plugin}"/>
<param name="packagejson.Location" value="${capstone}/zlux-app-server/lib/${plugin}"/>
</antcall>
<antcall target="npmBuild">
<param name="packagejson.Location" value="${pluginDir}/${plugin}"/>
<param name="packagejson.Location" value="${capstone}/zlux-app-server/lib/${plugin}"/>
<param name="buildType" value="build"/>
</antcall>
</then>
</if>

<for param="subfolder">
<path>
<dirset dir="${pluginDir}/${plugin}" includes="*"/>
<dirset dir="${capstone}/zlux-app-server/lib/${plugin}" includes="*"/>
</path>
<sequential>
<antcall target="npmInstall" unless:set="noInstall">
Expand Down
2 changes: 1 addition & 1 deletion common.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
plugins=../zlux-app-server/deploy/instance/ZLUX/plugins
plugins=../zlux-app-server/defaults/plugins
28 changes: 16 additions & 12 deletions deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@
<mkdir dir="${siteActions}"/>
<mkdir dir="${siteRecognizers}"/>

<mkdir dir="${instanceDir}/plugins"/>
<property name="serverConfig" value="${instanceDir}/ZLUX/serverConfig" unless:set="instanceMode"/>
<property name="serverConfig" value="${instanceDir}/serverConfig" if:set="instanceMode"/>
<property name="instancePlugins" value="${instanceDir}/ZLUX/plugins" unless:set="instanceMode"/>
<property name="instancePlugins" value="${instanceDir}/plugins" if:set="instanceMode"/>

<mkdir dir="${instancePlugins}"/>
<mkdir dir="${serverConfig}"/>
<mkdir dir="${instanceDir}/ZLUX/pluginStorage"/>
<mkdir dir="${instanceDir}/serverConfig"/>
<!-- A common storage area for apps to deploy their configs into for desktop behavior -->
<property name="instanceActions" value="${instanceDir}/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/actions"/>
<property name="instanceRecognizers" value="${instanceDir}/ZLUX/pluginStorage/org.zowe.zlux.ng2desktop/recognizers"/>
Expand All @@ -54,14 +59,14 @@
<mkdir dir="${instanceDir}/users"/>
<mkdir dir="${instanceDir}/groups"/>
<!-- # MVD bootstrap -->
<copy unless:set="isZos" todir="${instanceDir}/plugins">
<copy unless:set="isZos" todir="${instancePlugins}">
<fileset dir="${pluginDir}" includes="*.json"/>
</copy>
<exec if:set="isZos" executable="sh">
<arg line="-c 'cp -pR ${pluginDir}/*.json ${instanceDir}/plugins'"/>
<arg line="-c 'cp -pR ${pluginDir}/*.json ${instancePlugins}'"/>
</exec>

<copy unless:set="isZos" todir="${instanceDir}/serverConfig">
<copy unless:set="isZos" todir="${serverConfig}">
<fileset dir="${home}/defaults/serverConfig">
<include name="server.json"/>
<include name="zlux.keystore.cer"/>
Expand All @@ -77,7 +82,7 @@
${home}/defaults/serverConfig/zlux.keystore.key
${home}/defaults/serverConfig/apiml-localca.cer
${home}/defaults/serverConfig/tomcat.xml
${instanceDir}/serverConfig'"/>
${serverConfig}'"/>
</exec>
<antcall target="traverse"/>
<if>
Expand All @@ -94,25 +99,24 @@
</then>
</if>

<chmod unless:set="isWindows" dir="${instanceDir}/serverConfig" perm="750"/>
<chmod unless:set="isWindows" dir="${serverConfig}" perm="750"/>
<chmod unless:set="isWindows" perm="640">
<fileset dir="${instanceDir}/serverConfig"/>
<fileset dir="${serverConfig}"/>
</chmod>
</target>

<target name="cleanDeploy">
<delete quiet="true" dir="${instanceDir}"/>
<delete quiet="true" dir="${siteDir}"/>
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="${instanceDir}" includes="users/*/ZLUX, groups/*/ZLUX"/>
<fileset dir="${instanceDir}" includes="users/*, groups/*"/>
</delete>
</target>

<target name="devClean">
<delete quiet="true" dir="${instanceDir}/plugins"/>
<delete quiet="true" dir="${siteDir}/plugins"/>
<delete quiet="true" dir="${instancePlugins}"/>
<delete quiet="true" includeEmptyDirs="true">
<fileset dir="${instanceDir}" includes="users/*/ZLUX, groups/*/ZLUX"/>
<fileset dir="${instanceDir}" includes="users/*, groups/*"/>
</delete>
</target>
</project>
Expand Down

0 comments on commit d741790

Please sign in to comment.