Skip to content

Commit

Permalink
[SRVLOGIC-211] add script to remove modules that should not be in the…
Browse files Browse the repository at this point in the history
… productized build
  • Loading branch information
rgdoliveira committed Jan 22, 2024
1 parent 3c08db2 commit c52660f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions productized/modules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pom.xml;data-audit,security-commons,management-console,trusty-ui,task-console,explainability,trusty,jitexecutor,runtime-tools-quarkus-extension-parent
apps-integration-tests/pom.xml;integration-tests-jobs-service,integration-tests-trusty-audit,integration-tests-trusty-service
apps-integration-tests/integration-tests-data-index-service/pom.xml;integration-tests-data-index-service-common,integration-tests-data-index-service-quarkus,integration-tests-data-index-service-springboot
data-index/data-index-service/pom.xml;data-index-service-infinispan,data-index-service-mongodb,data-index-service-oracle
data-index/data-index-storage/pom.xml;data-index-storage-common,data-index-storage-infinispan,data-index-storage-mongodb,data-index-storage-postgresql-reporting,data-index-storage-oracle
data-index/kogito-addons-quarkus-data-index/pom.xml;kogito-addons-quarkus-data-index-infinispan,kogito-addons-quarkus-data-index-mongodb
data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/pom.xml;integration-tests-process
data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/pom.xml;integration-tests-process
data-index/kogito-addons-quarkus-data-index-persistence/pom.xml;kogito-addons-quarkus-data-index-persistence-infinispan,kogito-addons-quarkus-data-index-persistence-mongodb
data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml;integration-tests-process
jobs-service/pom.xml;jobs-service-infinispan,jobs-service-mongodb
persistence-commons/pom.xml;persistence-commons-infinispan,persistence-commons-mongodb,persistence-commons-redis,persistence-commons-reporting-parent
28 changes: 28 additions & 0 deletions productized/remove_modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
#
# This script expects a configuration file separated by semicolon, where the first part is the pom and the second the modules to be removed from that pom
# It can be invoked from project root folder using: $ ./productized/remove_modules.sh ./productized/modules

# fast fail
set -e
set -o pipefail

if [ $# -lt 1 ];
then
echo "$0: Missing arguments"
exit
fi

config_file="${1}"
for line in `cat "$config_file"`
do
pom=$(echo $line | cut -d ';' -f1)
modules=$(echo $line | cut -d ';' -f2)

modules_list=$(echo $modules | tr "," "\n")
for module in ${modules_list}
do
echo "Removing module ${module} from ${pom}"
sed -i "/<module>${module}<\/module/d" ${pom}
done
done

0 comments on commit c52660f

Please sign in to comment.