Bug fixing
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"write_tokens": [
|
|
||||||
"fizzle1",
|
|
||||||
"fizzle2",
|
|
||||||
"fizzle3"
|
|
||||||
],
|
|
||||||
"object_store_path": "/data/storage",
|
|
||||||
"host": "0.0.0.0",
|
|
||||||
"port": 8123
|
|
||||||
}
|
|
@@ -6,7 +6,7 @@ set -e
|
|||||||
# DIRECTORIES
|
# DIRECTORIES
|
||||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
CACHE_DIR="${SCRIPT_DIR}/cache"
|
CACHE_DIR="${SCRIPT_DIR}/cache"
|
||||||
EXE_DIR="${SCRIPT_DIR}/exe"
|
EXE_DIR="${SCRIPT_DIR}/output"
|
||||||
BUILD_DIR="${SCRIPT_DIR}/build"
|
BUILD_DIR="${SCRIPT_DIR}/build"
|
||||||
|
|
||||||
# FUNCTIONS
|
# FUNCTIONS
|
||||||
@@ -39,11 +39,11 @@ cd $SCRIPT_DIR
|
|||||||
|
|
||||||
# push the Docker image to the registry
|
# push the Docker image to the registry
|
||||||
|
|
||||||
if [ ! -f ${EXE_DIR}/simple_object_storage-linux-amd64 ]; then
|
if [ ! -f ${EXE_DIR}/simple_object_storage.amd64 ]; then
|
||||||
die "x86_64 executable not found"
|
die "amd64 executable not found"
|
||||||
fi
|
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"
|
die "arm64 executable not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
7
test.sh
7
test.sh
@@ -30,16 +30,15 @@ if ! command -v jq &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# read ~/.config/simple_object_storage/config.json
|
# 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
|
if [ ! -f "${CONFIG_PATH}" ]; then
|
||||||
echo "config file not found at ${CONFIG_PATH}"
|
echo "config file not found at ${CONFIG_PATH}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
CONFIG=$(cat "${CONFIG_PATH}")
|
CONFIG=$(cat "${CONFIG_PATH}")
|
||||||
|
|
||||||
# get the host and port from the config
|
HOST=localhost
|
||||||
HOST=$(echo $CONFIG | jq -r '.host')
|
PORT=8123
|
||||||
PORT=$(echo $CONFIG | jq -r '.port')
|
|
||||||
|
|
||||||
# extract the first write token from the config
|
# extract the first write token from the config
|
||||||
WRITE_TOKEN=$(echo $CONFIG | jq -r '.write_tokens[0]')
|
WRITE_TOKEN=$(echo $CONFIG | jq -r '.write_tokens[0]')
|
||||||
|
Reference in New Issue
Block a user