mirror of https://github.com/MedzikUser/go-pingbot
chore: nodemon has been replaced by air
This commit is contained in:
parent
6e9a5805d6
commit
15c60fa84a
|
@ -0,0 +1,32 @@
|
||||||
|
root = "."
|
||||||
|
tmp_dir = "tmp"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
bin = "./tmp/pingbot"
|
||||||
|
cmd = "make build BINARY_OUT=./tmp/pingbot"
|
||||||
|
delay = 1000
|
||||||
|
exclude_dir = ["tmp"]
|
||||||
|
exclude_file = []
|
||||||
|
exclude_regex = []
|
||||||
|
exclude_unchanged = false
|
||||||
|
follow_symlink = false
|
||||||
|
full_bin = ""
|
||||||
|
include_dir = []
|
||||||
|
include_ext = ["go", "toml"]
|
||||||
|
kill_delay = "0s"
|
||||||
|
log = "air-build-errors.log"
|
||||||
|
send_interrupt = false
|
||||||
|
stop_on_error = true
|
||||||
|
|
||||||
|
[color]
|
||||||
|
app = ""
|
||||||
|
build = "yellow"
|
||||||
|
main = "magenta"
|
||||||
|
runner = "green"
|
||||||
|
watcher = "cyan"
|
||||||
|
|
||||||
|
[log]
|
||||||
|
time = false
|
||||||
|
|
||||||
|
[misc]
|
||||||
|
clean_on_exit = true
|
|
@ -15,5 +15,7 @@ dist/
|
||||||
*.test
|
*.test
|
||||||
|
|
||||||
# Configs
|
# Configs
|
||||||
*.toml*
|
config.toml
|
||||||
!*schema.toml
|
|
||||||
|
# Log files
|
||||||
|
air-build-errors.log
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -1,4 +1,4 @@
|
||||||
BINARY_NAME := pingbot.out
|
BINARY_OUT := pingbot.out
|
||||||
|
|
||||||
# executables
|
# executables
|
||||||
GO := go
|
GO := go
|
||||||
|
@ -9,11 +9,10 @@ BUILD_FLAGS :=
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(GO) mod tidy
|
$(GO) mod tidy
|
||||||
$(GO) build ${BUILD_FLAGS} -o ${BINARY_NAME} ./cmd/pingbot
|
$(GO) build ${BUILD_FLAGS} -o ${BINARY_OUT} ./cmd/pingbot
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
$(GORELEASER) --snapshot --rm-dist
|
$(GORELEASER) --snapshot --rm-dist
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(GO) clean
|
$(GO) clean
|
||||||
rm -rf pingbot* dist/
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"watch": ["*"],
|
|
||||||
"ext": "go toml",
|
|
||||||
"signal": "SIGTERM",
|
|
||||||
"quiet": true,
|
|
||||||
"exec": "clear && bash nodemon.sh"
|
|
||||||
}
|
|
19
nodemon.sh
19
nodemon.sh
|
@ -1,19 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Colors
|
|
||||||
green="\e[0;92m"
|
|
||||||
red="\e[0;91m"
|
|
||||||
nc="\e[0m" # No Color
|
|
||||||
|
|
||||||
printf "${nc}[${green}Start${nc}]\n"
|
|
||||||
if ! go build -o pingbot.out; then
|
|
||||||
printf "${nc}[${red}COMPILE ERROR${nc}]\n"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
if ! ./pingbot.out; then
|
|
||||||
printf "${nc}[${red}PROGRAM PANIC${nc}]\n"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
printf "${nc}[${red}PROGRAM END${nc}]\n"
|
|
||||||
fi
|
|
||||||
fi
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
go mod tidy
|
|
||||||
|
|
||||||
# Lint
|
|
||||||
go fmt ./...
|
|
||||||
|
|
||||||
# Add changes
|
|
||||||
git add .
|
|
Loading…
Reference in New Issue