Added clean goal

This commit is contained in:
Pavel 2019-06-09 12:58:37 +03:00
parent 37d6d7baf7
commit 04e287ee17
2 changed files with 7 additions and 3 deletions

View File

@ -9,7 +9,11 @@ BIN=$(PROJECT_DIR)/bin/bash_im_bot
build: fmt deps build: fmt deps
@echo "- Building" @echo "- Building"
@cd $(SRC) && $(GO) build -o $(BIN) @cd $(SRC) && $(GO) build -o $(BIN)
@echo Built "$(BIN)" @echo - Built "$(BIN)"
clean:
@echo Cleaning...
@rm -rf $(dir ${BIN})
run: run:
@$(BIN) @$(BIN)

View File

@ -46,11 +46,11 @@ func LoadConfig() (BotConfig, error) {
dir, err := filepath.Abs(filepath.Dir(os.Args[0])) dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
if err != nil { if err != nil {
log.Fatal(err) log.Print(err)
} }
if err := godotenv.Load(filepath.Join(filepath.Dir(dir), ".env")); err != nil { if err := godotenv.Load(filepath.Join(filepath.Dir(dir), ".env")); err != nil {
return cfg, err log.Print(err)
} }
} }