From 228cd4d1fb4c1cdbdb9035537b748ae4efbc985c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 29 Jan 2024 14:12:14 +0800 Subject: [PATCH] build: refine Makefile targets and build command (#666) * build: refine Makefile targets and build command - Remove `test` from `.PHONY` and add `install`, `run`, and `clean` targets to `.PHONY` - Replace build command to include verbose flag and remove `-mod vendor` option Signed-off-by: Bo-Yi Wu * docs: refine README structure and update tests - Add a "Table of Contents" section to the README - Reorganize sections within the README, moving "Configuring AWS SES alerts" and "How to change the color thresholds of the response time badge" - Remove "Sponsors" section from the README - Update the test command in the README from `go test ./... -mod vendor` to `go test -v ./...` Signed-off-by: Bo-Yi Wu --------- Signed-off-by: Bo-Yi Wu --- Makefile | 9 +++++---- README.md | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 26ee58a6..a4a0a596 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ BINARY=gatus -# Because there's a folder called "test", we need to make the target "test" phony -.PHONY: test - +.PHONY: install install: - go build -mod vendor -o $(BINARY) . + go build -v -o $(BINARY) . +.PHONY: run run: GATUS_CONFIG_PATH=./config.yaml ./$(BINARY) +.PHONY: clean clean: rm $(BINARY) +.PHONY: test test: go test ./... -cover diff --git a/README.md b/README.md index 14d235f3..d09ac9d4 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga ## Table of Contents +- [Table of Contents](#table-of-contents) - [Why Gatus?](#why-gatus) - [Features](#features) - [Usage](#usage) @@ -48,7 +49,6 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga - [Storage](#storage) - [Client configuration](#client-configuration) - [Alerting](#alerting) - - [Configuring AWS SES alerts](#configuring-aws-ses-alerts) - [Configuring Discord alerts](#configuring-discord-alerts) - [Configuring Email alerts](#configuring-email-alerts) - [Configuring GitHub alerts](#configuring-github-alerts) @@ -66,6 +66,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga - [Configuring Teams alerts](#configuring-teams-alerts) - [Configuring Telegram alerts](#configuring-telegram-alerts) - [Configuring Twilio alerts](#configuring-twilio-alerts) + - [Configuring AWS SES alerts](#configuring-aws-ses-alerts) - [Configuring custom alerts](#configuring-custom-alerts) - [Setting a default alert](#setting-a-default-alert) - [Maintenance](#maintenance) @@ -107,10 +108,10 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga - [Uptime](#uptime) - [Health](#health) - [Response time](#response-time) + - [How to change the color thresholds of the response time badge](#how-to-change-the-color-thresholds-of-the-response-time-badge) - [API](#api) - [Installing as binary](#installing-as-binary) - [High level design overview](#high-level-design-overview) -- [Sponsors](#sponsors) ## Why Gatus? @@ -1504,7 +1505,7 @@ Gatus can be deployed on Terraform by using the following module: [terraform-kub ## Running the tests ```console -go test ./... -mod vendor +go test -v ./... ```