cloudcomputing-platform-web.../deploy.sh

36 lines
837 B
Bash
Executable File

# VERSION=1.0.0-snapshot
# MVN_VERSION=$(mvn -q \
# -Dexec.executable=echo \
# -Dexec.args='${project.version}' \
# --non-recursive \
# exec:exec)
# echo "MVN_VERSION=${MVN_VERSION}"
# 10.1.30.156
DEST_HOST=lr62-dev
# DEST_HOST=lr62-prod-01
# DEST_HOST=lr62-prod-02
MVN_NAME=$(mvn -q \
-Dexec.executable=echo \
-Dexec.args='${project.artifactId}' \
--non-recursive \
exec:exec)
echo "MVN_NAME=${MVN_NAME}"
MVN_FINALNAME=$(mvn -q \
-Dexec.executable=echo \
-Dexec.args='${project.build.finalName}' \
--non-recursive \
exec:exec)
echo "MVN_FINALNAME=${MVN_FINALNAME}"
mvn clean package
scp target/$MVN_FINALNAME.war life@$DEST_HOST:/home/life/Portal-Bundle/deploy/$MVN_NAME.war
ssh $DEST_HOST "sudo journalctl -fl -u liferay"