d1fdb02f09391e5e513be5e6bc33eef03ce9168b

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Clean up

Diff

  1diff --git a/.dockerignore b/.dockerignore
  2index 89e0ff25e582146c466e0971ea988ca673c46052..34b70187d6d275b0430cbdfbbdb82d2c18fdcf89 100644
  3--- a/.dockerignore
  4+++ b/.dockerignore
  5@@ -1,18 +1,15 @@
  6-# Ignore everything and explicitly include the things we need
  7-*
  8-.*
  9+bin
 10+dist
 11 
 12-!cmd
 13-!config
 14-!db
 15-!feedparser
 16-!handler
 17-!httpserver
 18-!lib
 19-!migrations
 20-!mocks
 21-!models
 22+compose.yaml
 23+Dockerfile
 24+.dockerignore
 25 
 26-!go.mod
 27-!go.sum
 28-!Makefile
 29+.git
 30+.gitignore
 31+
 32+Makefile
 33+.golangci.yml
 34+
 35+LICENSE
 36+README.md
 37diff --git a/.golangci.bck.yml b/.golangci.bck.yml
 38deleted file mode 100644
 39index 9df66c947e8a1f356a8453dbcd3e6cde88ece7ee..0000000000000000000000000000000000000000
 40--- a/.golangci.bck.yml
 41+++ /dev/null
 42@@ -1,17 +0,0 @@
 43----
 44-linters:
 45-  enable:
 46-    - goimports
 47-    - stylecheck
 48-    - lll
 49-  disable:
 50-    - errcheck
 51-
 52-run:
 53-  go: '1.17'
 54-
 55-issues:
 56-  exclude-rules:
 57-    - linters:
 58-        - lll
 59-      source: "// nolint:lll"
 60diff --git a/.yamllint.yaml b/.yamllint.yaml
 61deleted file mode 100644
 62index eaeb396ef9547450de7152108c9a8af3a69b3de1..0000000000000000000000000000000000000000
 63--- a/.yamllint.yaml
 64+++ /dev/null
 65@@ -1,8 +0,0 @@
 66----
 67-extends: default
 68-# files managed by flux won't pass linting
 69-ignore: |
 70-  k8s/*/patches/deployment*
 71-  k8s/*/secrets/*
 72-rules:
 73-  line-length: disable
 74diff --git a/Makefile b/Makefile
 75index f58be148ea40a62b5e46ae23b1cf65783457ba72..41a274c7f9f238a37404c442fe79d1f68ce9a26d 100644
 76--- a/Makefile
 77+++ b/Makefile
 78@@ -2,24 +2,8 @@
 79 
 80 DB_URI ?= postgres://ytrssil:ytrssil@localhost:5432/ytrssil?sslmode=disable
 81 
 82-all: lint test build
 83-
 84-setup: bin/golangci-lint
 85-	go mod download
 86-
 87-ytrssil-api:
 88-	go build -o dist/ytrssil-api cmd/main.go
 89-
 90-build: ytrssil-api
 91-
 92 bin/moq:
 93 	GOBIN=$(PWD)/bin go install github.com/matryer/moq@v0.5.3
 94-
 95-gen-mocks: bin/moq
 96-	./bin/moq -pkg db_mock -out ./mocks/db/db.go ./db DB
 97-	./bin/moq -pkg parser_mock -out ./mocks/feedparser/feedparser.go ./feedparser Parser
 98-	go fmt ./...
 99-
100 bin/golangci-lint:
101 	GOBIN=$(PWD)/bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.3.1
102 bin/migrate: bin
103@@ -35,15 +19,14 @@ test:
104 	go mod tidy
105 	go test -timeout=10s -race -benchmem ./...
106 
107+gen-mocks: bin/moq
108+	./bin/moq -pkg db_mock -out ./mocks/db/db.go ./db DB
109+	./bin/moq -pkg parser_mock -out ./mocks/feedparser/feedparser.go ./feedparser Parser
110+	go fmt ./...
111+
112 migrate: bin/migrate
113 	bin/migrate -database "$(DB_URI)" -path migrations up
114 
115 image-build:
116-	@echo "# Building docker image..."
117-	docker build -t theedgeofrage/ytrssil:api --target api .
118-	docker build -t theedgeofrage/ytrssil:migrations --target migrations .
119-
120-image-push: image-build
121-	@echo "# Pushing docker image..."
122-	docker push theedgeofrage/ytrssil:api
123-	docker push theedgeofrage/ytrssil:migrations
124+	docker buildx build --push -t theedgeofrage/ytrssil:api --target api .
125+	docker buildx build --push -t theedgeofrage/ytrssil:migrations --target migrations .