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
|
||||
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
|
||||
|
||||
|
7
test.sh
7
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]')
|
||||
|
Reference in New Issue
Block a user