From: Ray Lee Date: Thu, 23 Mar 2023 03:26:30 +0000 (-0400) Subject: Add ant tasks to build ui packages from source. (#320) X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=fe6dfcbb6aa13e73c335b5b48d5ae4c96330d9f0;p=tmp%2Fjakarta-migration.git Add ant tasks to build ui packages from source. (#320) --- diff --git a/.gitignore b/.gitignore index 0c7bcc568..479e62cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ dev-master.xml .metadata/ *tenant-bindings.merged.xml +build target .settings .classpath @@ -17,4 +18,4 @@ target m2-settings.xml *.log cspace-app-perflog.csv -.flattened-pom.xml \ No newline at end of file +.flattened-pom.xml diff --git a/build.properties b/build.properties index c02a726ca..476a4ed1a 100644 --- a/build.properties +++ b/build.properties @@ -20,8 +20,11 @@ cspace.services.war=${cspace.services.context}.war domain.nuxeo=nuxeo-server # UI settings +cspace.ui.package.name=cspace-ui cspace.ui.library.name=cspaceUI cspace.ui.version=7.0.0 +cspace.ui.build.branch=master +cspace.ui.build.node.ver=14 #nuxeo nuxeo.release=9.10-HF30 diff --git a/cspace-ui/anthro/build.properties b/cspace-ui/anthro/build.properties index d8fd6d44d..ffe48bca5 100644 --- a/cspace-ui/anthro/build.properties +++ b/cspace-ui/anthro/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-anthro tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileAnthro tenant.ui.profile.plugin.version=6.0.5 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/bonsai/build.properties b/cspace-ui/bonsai/build.properties index 0e519975d..589fc5e57 100644 --- a/cspace-ui/bonsai/build.properties +++ b/cspace-ui/bonsai/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-bonsai tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileBonsai tenant.ui.profile.plugin.version=5.0.2 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/botgarden/build.properties b/cspace-ui/botgarden/build.properties index cca27934e..b00899d5c 100644 --- a/cspace-ui/botgarden/build.properties +++ b/cspace-ui/botgarden/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-botgarden tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileBotGarden tenant.ui.profile.plugin.version=3.0.2 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/build.xml b/cspace-ui/build.xml index 6d799d0d2..4ae1cc20d 100644 --- a/cspace-ui/build.xml +++ b/cspace-ui/build.xml @@ -19,29 +19,73 @@ - + + + + + + - + + + + + - - - + + + + + + + + + + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + - + @@ -51,12 +95,13 @@ - + + @@ -78,27 +123,74 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + - - - + + + - + + + + @@ -124,7 +216,7 @@ - + - + diff --git a/cspace-ui/build_js.sh b/cspace-ui/build_js.sh new file mode 100644 index 000000000..662572fba --- /dev/null +++ b/cspace-ui/build_js.sh @@ -0,0 +1,21 @@ +#/bin/bash + +PACKAGE_NAME=$1 +BRANCH_NAME=$2 +CHECKOUT_DIR=$3 +OUTPUT_DIR=$4 +LIBRARY_NAME=$5 + +CODE_DIR=$CHECKOUT_DIR/$PACKAGE_NAME.js + +. "$HOME/.nvm/nvm.sh" + +rm -r $CODE_DIR +git clone --branch $BRANCH_NAME --depth 1 https://github.com/collectionspace/$PACKAGE_NAME.js.git $CODE_DIR + +pushd $CODE_DIR +COMMIT_HASH=`git rev-parse --short HEAD` +npm install +popd + +cp $CODE_DIR/dist/*.min.js "$OUTPUT_DIR/$LIBRARY_NAME@$COMMIT_HASH.min.js" diff --git a/cspace-ui/fcart/build.properties b/cspace-ui/fcart/build.properties index 323953ee9..371c95acb 100644 --- a/cspace-ui/fcart/build.properties +++ b/cspace-ui/fcart/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-fcart tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileFCart tenant.ui.profile.plugin.version=5.0.3 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/herbarium/build.properties b/cspace-ui/herbarium/build.properties index 8f8c1db05..c5e7e4703 100644 --- a/cspace-ui/herbarium/build.properties +++ b/cspace-ui/herbarium/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-herbarium tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileHerbarium tenant.ui.profile.plugin.version=2.0.2 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/lhmc/build.properties b/cspace-ui/lhmc/build.properties index 214099855..3bf180b9e 100644 --- a/cspace-ui/lhmc/build.properties +++ b/cspace-ui/lhmc/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-lhmc tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileLHMC tenant.ui.profile.plugin.version=5.0.3 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/materials/build.properties b/cspace-ui/materials/build.properties index b75eaf9b4..abe175143 100644 --- a/cspace-ui/materials/build.properties +++ b/cspace-ui/materials/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-materials tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileMaterials tenant.ui.profile.plugin.version=3.0.3 +tenant.ui.profile.plugin.build.branch=master diff --git a/cspace-ui/publicart/build.properties b/cspace-ui/publicart/build.properties index 7912523dc..830ef2d9c 100644 --- a/cspace-ui/publicart/build.properties +++ b/cspace-ui/publicart/build.properties @@ -4,3 +4,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-publicart tenant.ui.profile.plugin.library.name=cspaceUIPluginProfilePublicArt tenant.ui.profile.plugin.version=4.0.3 +tenant.ui.profile.plugin.build.branch=master