PromucFlow_constructor/app/server/build.sh
Trisha Anand 8f3591615a
feat: RBAC framework (#14823)
Co-authored-by: Sidhant Goel <sidhant@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: Sangeeth Sivan <sangeeth@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
2022-08-22 23:27:07 +05:30

44 lines
971 B
Bash
Executable File

#!/bin/bash
# Remove previous dist directory
rm -rf dist/
is_tests_enabled=true
for i in "$@"; do
if [[ $i == "-DskipTests" ]]; then
is_tests_enabled=false
break
fi
done
if $is_tests_enabled; then
# If tests will be run, let's pull some required images that often fail to be pulled from inside Maven's test run.
docker image pull testcontainers/ryuk:0.3.0
fi
if [[ -f .env ]]; then
echo "Found a .env file, loading environment variables from that file."
set -o allexport
source .env
fi
# Build the code. $@ accepts all the parameters from the input command line and uses it in the maven build command
mvn clean package "$@"
if [[ $? -eq 0 ]]; then
echo "mvn Successful"
else
echo "mvn Failed"
exit 1
fi
# Create the dist directory
mkdir -p dist/plugins
# Copy the server jar
cp -v ./appsmith-server/target/server-*.jar dist/
# Copy all the plugins
rsync -av --exclude "original-*.jar" ./appsmith-plugins/*/target/*.jar dist/plugins/