This commit is contained in:
Your Name
2025-05-03 13:22:45 +12:00
parent 11dccca171
commit 62d3e0b98d
7 changed files with 113 additions and 562 deletions

View File

@@ -1,9 +1,15 @@
#!/bin/bash
# Exit on error
set -e
# DIRECTORIES
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
CACHE_DIR="${SCRIPT_DIR}/cache"
EXE_DIR="${SCRIPT_DIR}/exe"
BUILD_DIR="${SCRIPT_DIR}/build"
# FUNCTIONS
function title() {
echo "----------------------------------------"
# Center the text
@@ -61,11 +67,9 @@ function build() {
cp build/simple_object_storage $EXE_DIR/simple_object_storage-$ARCH
}
# Exit on error
set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
#--------------------------------
# MAIN
#--------------------------------
cd $SCRIPT_DIR
clean_cache
@@ -92,4 +96,6 @@ echo "Building multi-platform Docker image"
docker buildx build --load -t simple-object-storage:latest --platform linux/amd64,linux/arm64 .
clean
clean_cache
clean_cache
echo "Build completed successfully!"