From 8be69f24b612c27b8142c3c1bd7c1b5d48e3fc86 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 25 May 2025 14:36:37 +1200 Subject: [PATCH] Bug fixing --- .docker/.docker_config.json | 10 ---------- publish.sh | 8 ++++---- build-docker.sh => test-docker.sh | 0 test.sh | 7 +++---- 4 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 .docker/.docker_config.json rename build-docker.sh => test-docker.sh (100%) diff --git a/.docker/.docker_config.json b/.docker/.docker_config.json deleted file mode 100644 index b34d2cf..0000000 --- a/.docker/.docker_config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "write_tokens": [ - "fizzle1", - "fizzle2", - "fizzle3" - ], - "object_store_path": "/data/storage", - "host": "0.0.0.0", - "port": 8123 -} diff --git a/publish.sh b/publish.sh index 07cb041..82f4e59 100755 --- a/publish.sh +++ b/publish.sh @@ -6,7 +6,7 @@ set -e # DIRECTORIES SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CACHE_DIR="${SCRIPT_DIR}/cache" -EXE_DIR="${SCRIPT_DIR}/exe" +EXE_DIR="${SCRIPT_DIR}/output" BUILD_DIR="${SCRIPT_DIR}/build" # FUNCTIONS @@ -39,11 +39,11 @@ cd $SCRIPT_DIR # push the Docker image to the registry -if [ ! -f ${EXE_DIR}/simple_object_storage-linux-amd64 ]; then - die "x86_64 executable not found" +if [ ! -f ${EXE_DIR}/simple_object_storage.amd64 ]; then + die "amd64 executable not found" fi -if [ ! -f ${EXE_DIR}/simple_object_storage-linux-arm64 ]; then +if [ ! -f ${EXE_DIR}/simple_object_storage.arm64 ]; then die "arm64 executable not found" fi diff --git a/build-docker.sh b/test-docker.sh similarity index 100% rename from build-docker.sh rename to test-docker.sh diff --git a/test.sh b/test.sh index c91a67a..1655e4e 100755 --- a/test.sh +++ b/test.sh @@ -30,16 +30,15 @@ if ! command -v jq &> /dev/null; then fi # read ~/.config/simple_object_storage/config.json -CONFIG_PATH="${HOME}/.config/simple_object_storage/config.json" +CONFIG_PATH="${SCRIPT_DIR}/.docker/config.json" if [ ! -f "${CONFIG_PATH}" ]; then echo "config file not found at ${CONFIG_PATH}" exit 1 fi CONFIG=$(cat "${CONFIG_PATH}") -# get the host and port from the config -HOST=$(echo $CONFIG | jq -r '.host') -PORT=$(echo $CONFIG | jq -r '.port') +HOST=localhost +PORT=8123 # extract the first write token from the config WRITE_TOKEN=$(echo $CONFIG | jq -r '.write_tokens[0]')