From d4a2a00f69bce1623faaf9aa17b5c2909d0b59a7 Mon Sep 17 00:00:00 2001
From: Imbus <>
Date: Fri, 8 Mar 2024 10:17:51 +0100
Subject: [PATCH] Makefile update with doc generation and convenience
 installers

---
 backend/Makefile | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/backend/Makefile b/backend/Makefile
index cb0bb64..bd906e4 100644
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -13,7 +13,7 @@ MIGRATIONS_DIR = internal/database/migrations
 
 # Build target
 build:
-	$(GOBUILD) -o bin/server cmd/*.go
+	$(GOBUILD) -o bin/server main.go
 
 # Run target
 run: build
@@ -71,6 +71,21 @@ lint:
 # Default target
 default: build	
 
+# Generate swagger docs
+.PHONY: docs
+docs:
+	swag init -outputTypes go
+
+install-swag:
+	@echo "Installing swag"
+	@go get -u github.com/swaggo/swag/cmd/swag
+
+# Convenience target to install golangci-lint
+install-lint:
+	@echo "Installing golangci-lint"
+	@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.42.1
+
+# Convenience target to install just (requires sudo privileges)
 install-just:
 	@echo "Installing just"
 	@curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin