.
This commit is contained in:
18
build.sh
18
build.sh
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user