Last active
April 12, 2018 23:58
-
-
Save drewbrokke/4a782d1d5d53a7d0da0e3f47e0de9af0 to your computer and use it in GitHub Desktop.
Regen UAD modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOP_LEVEL="$(git rev-parse --show-toplevel)" | |
GRADLEW="${TOP_LEVEL}/gradlew" | |
# Go to top level | |
cd "${TOP_LEVEL}" || exit 1 | |
# Deploy ServiceBuilder changes | |
( | |
cd "modules/util/portal-tools-service-builder" || exit 1 | |
"${GRADLEW}" clean deploy | |
) | |
# Regen each UAD module | |
for i in $(git grep -l 'uad-' '*service.xml') | |
do | |
( | |
cd "${i%/service.xml}" || exit 1 | |
"${GRADLEW}" buildService -Pcom.liferay.portal.tools.service.builder.ignore.local=false | |
cd "${TOP_LEVEL}/${i/-service\/service.xml/-uad}" || exit 1 | |
"${GRADLEW}" compileJava || exit 1 | |
git add . | |
git commit -m "$(git rev-parse --abbrev-ref HEAD | grep -oE "^[A-Z]+-\d+") $(basename "$(pwd)") - autogenerated" | |
) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment