From 0c6a4bfb7a0754c876f527886fd168b868237dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Tue, 13 Oct 2020 10:04:40 +0200 Subject: [PATCH] ci: allow passing modified modules from command line (#220) --- scripts/prepareDeploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/prepareDeploy.sh b/scripts/prepareDeploy.sh index a80c37b4d02..443f2958e9a 100755 --- a/scripts/prepareDeploy.sh +++ b/scripts/prepareDeploy.sh @@ -76,7 +76,13 @@ done [ "$versionBase" = 14.4 -o "$versionBase" = 17.0 ] && lastTag=`git tag | grep "^$versionBase" | head -1` if [ -n "$lastTag" ] then - modules=`git diff --name-only $lastTag HEAD | grep '.java$' | cut -d "/" -f1 | grep parent | sort -u | perl -pe 's,-flow-parent,,g'` + shift + ## allow setting modules to build from command line or via env var + [ -n "$modified" ] || modified=$* + ## otherwise utilise git history to figure out modified modules + [ -n "$modified" ] || modified=`git diff --name-only $lastTag HEAD | grep '.java$' | cut -d "/" -f1 | grep parent | sort -u | perl -pe 's,-flow-parent,,g'` + + [ -n "$modified" ] && modules="$modified" echo "Increasing version of the modified modules since last release $lastTag" for i in $modules do