You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by su...@apache.org on 2017/01/31 22:18:46 UTC

knox git commit: KNOX-839 new ant tasks to help with admin-ui development

Repository: knox
Updated Branches:
  refs/heads/master fd7e79755 -> 3db608ea9


KNOX-839 new ant tasks to help with admin-ui development


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/3db608ea
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/3db608ea
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/3db608ea

Branch: refs/heads/master
Commit: 3db608ea9ce3e2109ad992013efe3ed811734686
Parents: fd7e797
Author: Sumit Gupta <su...@apache.org>
Authored: Tue Jan 31 17:18:15 2017 -0500
Committer: Sumit Gupta <su...@apache.org>
Committed: Tue Jan 31 17:18:15 2017 -0500

----------------------------------------------------------------------
 build.xml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/3db608ea/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index ec15eef..7ddb833 100644
--- a/build.xml
+++ b/build.xml
@@ -65,6 +65,13 @@ Release build file for the Apache Knox Gateway
 <os family="windows" />
 </condition>
 
+<condition property="ng.cmd" value="ng">
+<os family="unix" />
+</condition>
+<condition property="ng.cmd" value="ng">
+<os family="windows" />
+</condition>
+
   <target name="_username">
     <input message="" addproperty="username">
       <handler classname="org.apache.tools.ant.input.SecureInputHandler"/>
@@ -389,4 +396,27 @@ Release build file for the Apache Knox Gateway
     <target name="stop-test-servers" depends="stop-test-gateway,stop-test-ldap" description="Stop test LDAP server and gateway servers."/>
     <target name="restart-test-servers" depends="stop-test-servers,start-test-servers" description="Restart test LDAP and gateway servers."/>
 
+    <target name="build-admin-ui" description="Use the 'ng' command to make a production build of the Admin UI project">
+        <exec executable="ng" dir="gateway-admin-ui">
+            <arg value="build"/>
+            <arg value="--prod"/>
+        </exec>
+    </target>
+
+    <target name="install-test-admin-ui" depends="build-admin-ui" description="Install the Admin UI build into the test gateway home installation">
+        <delete dir="${install.dir}/${gateway-artifact}-${gateway-version}/data/applications/admin-ui/app/" quiet="true"/>
+        <mkdir dir="${install.dir}/${gateway-artifact}-${gateway-version}/data/applications/admin-ui/app/"/>
+        <copy todir="${install.dir}/${gateway-artifact}-${gateway-version}/data/applications/admin-ui/app/">
+           <fileset dir="gateway-admin-ui/dist"/>
+        </copy>
+        <touch file="${install.dir}/${gateway-artifact}-${gateway-version}/conf/topologies/manager.xml"/>
+    </target>
+
+    <target name="promote-admin-ui" depends="build-admin-ui" description="Copy the build artifacts of the admin UI to the applications module for check-in">
+        <delete dir="gateway-applications/src/main/resources/applications/admin-ui/app/" quiet="true"/>
+        <mkdir dir="gateway-applications/src/main/resources/applications/admin-ui/app/"/>
+        <copy todir="gateway-applications/src/main/resources/applications/admin-ui/app/">
+            <fileset dir="gateway-admin-ui/dist"/>
+        </copy>
+    </target>
 </project>