Skip to content

Commit 5518143

Browse files
committed
ensure container restart happens
add notification use pom_file variable
1 parent cb5f90f commit 5518143

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

scripts/functions-aem.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,11 @@ function doCheckPathExist() {
127127
}
128128

129129
function restart_aem_docker() {
130-
if [[ "false" == "$SKIP_RESTART" ]]; then
131-
AEM_CONTAINER_NAME=$(getContainerNameByPort "$AEM_PORT")
132-
echo "Restarting AEM Docker Container: ${AEM_CONTAINER_NAME}"
133-
doRestartContainerUsingPort "$AEM_PORT"
134-
#doPostFields "/system/console/vmstat" "-F shutdown_type=Restart"
135-
fi
136-
137-
130+
echo "Finding AEM Docker Container on port: ${AEM_PORT}"
131+
AEM_CONTAINER_NAME=$(getContainerNameByPort "${AEM_PORT}")
132+
echo "Restarting AEM Docker Container: ${AEM_CONTAINER_NAME}"
133+
doRestartContainerUsingPort "${AEM_PORT}"
134+
#doPostFields "/system/console/vmstat" "-F shutdown_type=Restart"
138135

139136
set_term_title "Wait for AEM Ready"
140137
echo "Waiting for AEM to be ready"
@@ -152,7 +149,7 @@ function delete_current_jar() {
152149
set_term_title "Get Project Version"
153150

154151
PROJECT_VERSION=$(getParamOrDefault "" "version")
155-
PROJECT_ARTIFACTID=$($CAT "./pom.xml" | $GREP artifactId | $HEAD -n 2 | $TAIL -n 1 | $SED -e 's/.*>\(.*\)<.*/\1/')
152+
PROJECT_ARTIFACTID=$($CAT "$POM_FILE" | $GREP artifactId | $HEAD -n 2 | $TAIL -n 1 | $SED -e 's/.*>\(.*\)<.*/\1/')
156153
GIT_VERSION=$(getCurrentProjectVersion)
157154

158155
echo "Current Project Version: $PROJECT_VERSION"

0 commit comments

Comments
 (0)