diff --git a/Makefile b/Makefile index 9e9a92e..7756649 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -OUTPUT_BINARY_NAME = "cloud-client" -OUTPUT_DIR_NAME = "cloud-client" +OUTPUT_BINARY_NAME = "client" +OUTPUT_DIR_NAME = "client" ASSETS_DIR_NAME = "assets" @@ -7,7 +7,7 @@ BUILD_DIR = "../../build" build: go build -o ${BUILD_DIR}/${OUTPUT_DIR_NAME}/${OUTPUT_BINARY_NAME} - @if [ -d ${ASSETS_DIR_NAME} ];then \ + @if [ -d ${ASSETS_DIR_NAME} ] && [ -n "`ls -A ${ASSETS_DIR_NAME}`" ] ;then \ cp -r ${ASSETS_DIR_NAME}/* ${BUILD_DIR}/${OUTPUT_DIR_NAME}/; \ fi diff --git a/assets/config/config.json b/assets/config/config.json deleted file mode 100644 index 8511215..0000000 --- a/assets/config/config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "grpcPort": 5010, - "grpcPacketSize": 10, - "ipfsPort": 10, - "maxReplicateNumber": 10, - "localIP": "127.0.0.1", - "externalIP": "127.0.0.1", - "rabbitMQ": { - "address": "127.0.0.1:5672", - "account": "guest", - "password": "guest" - } -} \ No newline at end of file diff --git a/internal/config/config.go b/internal/config/config.go index 24da864..6d4f69c 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -18,7 +18,7 @@ type Config struct { var cfg Config func Init() error { - return config.DefaultLoad(&cfg) + return config.DefaultLoad("client", &cfg) } func Cfg() *Config {