Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SRVLOGIC-211] add script to remove modules that should not be in the productized build #3

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading