feat: update makefile and readme

This commit is contained in:
Urko 2023-07-10 12:43:51 +02:00
parent 24f2119331
commit b8b5d133a6
2 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,11 @@
BIN_DIR := ./bin BIN_DIR := ./bin
APP_NAME := backblaze-backup APP_NAME := backblaze-backup
.PHONY: local_run
local_run:
go run ./cmd/main.go --dir "$(DIR)" --bucket "$(BUCKET)"
.PHONY: build_windows .PHONY: build_windows
build_windows: build_windows:
@mkdir -p $(BIN_DIR) @mkdir -p $(BIN_DIR)

View File

@ -45,6 +45,14 @@ Or if you want to upload a single file:
./bin/backblaze-backup --bucket "your-bucket-name" --file "/path/to/file" ./bin/backblaze-backup --bucket "your-bucket-name" --file "/path/to/file"
``` ```
You can also use the **`local_run`** command in the Makefile to run the application with a test directory and bucket:
```bash
make local_run DIR="/home/user/test-upload" BUCKET="my-test-bucket"
```
This will run the application with the directory **/home/user/test-upload** and the bucket **my-test-bucket**.
## Flags ## Flags
--bucket: The name of your Backblaze bucket --bucket: The name of your Backblaze bucket