I am asking for an experienced person to review my basic shell script. I do not write them at work, but I am a software developer. I am using this for my personal project that I am working on. Later, it will be integrated with Docker and a CI server maybe Jenkins/Travis CI.
I am just looking for someone to tell me if I am not following best practices or conventions, or if certain parts need to be changed/revised.
#!/bin/bash
PATH=$PATH:$(npm bin)
set -x
webapp="/Users/earzate/Development/Career/profile-page-app"
serverapp="/Users/earzate/Development/Career/profile-server-ws/app-server"
#build profile-page-app
cd $webapp
echo "Building ng page app"
ng build --prod
echo "ng page app build complete"
#build app-server
echo "Cleaning static sources"
#clean old static web files
cd "$serverapp/src/main/resources"
echo "Deletic static web resources"
rm -r static
#make new static directory
echo "Creating static directory"
mkdir static
#copy web resources from webapp into serverapp static directory
echo "Copying static resources into directory"
cp -r "$webapp/dist/." "$serverapp/src/main/resources/static"
#copy secured objects from secured directory
#secured objects not versioned in git
cp "$serverapp/secured/name/private-key.p12" "$serverapp/src/main/resources"
echo "Building jar"
cd "$serverapp"
./gradlew build
echo "Deploying app"
java -jar build/libs/app-server-0.0.1-SNAPSHOT.jar