From b8b5d133a647427d21f6f482cb6561f67784cddf Mon Sep 17 00:00:00 2001 From: Urko Date: Mon, 10 Jul 2023 12:43:51 +0200 Subject: [PATCH] feat: update makefile and readme --- Makefile | 5 +++++ Readme.md | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/Makefile b/Makefile index b1744f4..d879e81 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ BIN_DIR := ./bin APP_NAME := backblaze-backup + +.PHONY: local_run +local_run: + go run ./cmd/main.go --dir "$(DIR)" --bucket "$(BUCKET)" + .PHONY: build_windows build_windows: @mkdir -p $(BIN_DIR) diff --git a/Readme.md b/Readme.md index 4322705..1583586 100644 --- a/Readme.md +++ b/Readme.md @@ -45,6 +45,14 @@ Or if you want to upload a single 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 --bucket: The name of your Backblaze bucket