mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
28 lines
647 B
Bash
Executable File
28 lines
647 B
Bash
Executable File
#! /bin/bash
|
|
###########################################
|
|
#
|
|
###########################################
|
|
|
|
# constants
|
|
baseDir=$(cd `dirname "$0"`;pwd)
|
|
cwdDir=$PWD
|
|
export PYTHONUNBUFFERED=1
|
|
export PATH=/opt/miniconda3/envs/venv-py3/bin:$PATH
|
|
export TS=$(date +%Y%m%d%H%M%S)
|
|
export DATE=`date "+%Y%m%d"`
|
|
export DATE_WITH_TIME=`date "+%Y%m%d-%H%M%S"` #add %3N as we want millisecond too
|
|
|
|
# functions
|
|
|
|
# main
|
|
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
|
cd $baseDir/..
|
|
mvn -DskipTests clean package deploy
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Deploy success."
|
|
exit 0
|
|
else
|
|
echo "Error happens during deployment."
|
|
exit 1
|
|
fi |