31 lines
543 B
Bash
Executable File
31 lines
543 B
Bash
Executable File
#!/bin/bash
|
|
BLUE='\033[0;34m'
|
|
GREEN='\033[0;32m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Function to print timestamp
|
|
timestamp(){
|
|
date "+%Y-%m-%d %H:%M:%S"
|
|
}
|
|
|
|
# Begin build process
|
|
echo -e "${BLUE}$(timestamp)[BUILD]${NC}"
|
|
|
|
# if any of the commands fail, exit
|
|
set -e
|
|
# set up python venv
|
|
python3 -m venv venv
|
|
source venv/bin/activate
|
|
|
|
# Satisfy python dependencies
|
|
python3 -m pip install -r gateway/requirements.txt
|
|
|
|
echo -e "${GREEN}$(timestamp)[BUILD FINISHED]${NC}"
|
|
|
|
|
|
# Build storage crate
|
|
pushd storage
|
|
cargo build --release
|
|
popd
|
|
|
|
# Run the project |