Added Hot Reloading to config.json file
This commit is contained in:
1 parent
396d15312a
commit
c2c75ff21c
5 files changed
+130
-33
No files matched your search
@@ -1,15 +1,14 @@
|
||||
APP_NAME = DDNSUpdater
|
||||
BIN_DIR = bin
|
||||
VERSION = 0.1.0
|
||||
BIN_DIR = bin
|
||||
VERSION = 0.1.0
|
||||
OUT = $(BIN_DIR)\$(APP_NAME).exe
|
||||
FLAGS = -trimpath -ldflags="-s -w -X main.version=$(VERSION)"
|
||||
|
||||
all: build run
|
||||
|
||||
# Default build
|
||||
build:
|
||||
@if not exist $(BIN_DIR) mkdir $(BIN_DIR)
|
||||
set CGO_ENABLED=0 && \
|
||||
set GOOS=windows && set GOARCH=amd64 && \
|
||||
go build -ldflags="-s -w -trimpath -X main.version=$(VERSION)" -o $(BIN_DIR)\$(APP_NAME).exe .
|
||||
cmd /c "set CGO_ENABLED=0 && go build $(FLAGS) -o $(OUT) ."
|
||||
|
||||
run:
|
||||
go run .
|
||||
@@ -17,13 +16,6 @@ run:
|
||||
clean:
|
||||
@if exist $(BIN_DIR) rmdir /s /q $(BIN_DIR)
|
||||
|
||||
# Windows-specific optimized build
|
||||
windows:
|
||||
@if not exist $(BIN_DIR) mkdir $(BIN_DIR)
|
||||
set CGO_ENABLED=0 && \
|
||||
set GOOS=windows && set GOARCH=amd64 && \
|
||||
go build -ldflags="-s -w -trimpath -X main.version=$(VERSION)" -o $(BIN_DIR)\$(APP_NAME).exe .
|
||||
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
|
||||
Reference in new issue
Block a user