File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 99/bin
1010/target
1111/build
12+ /ddns
13+ * .tar.gz
1214
1315# Test binary, built with `go test -c`
1416* .test
Original file line number Diff line number Diff line change @@ -16,11 +16,23 @@ help: ## show help
1616
1717LD_FLAGS =-ldflags "-X ddns/pkg/config.Version=$(VERSION ) "
1818
19- build : # # build target
19+ clean : # # clean build target
20+
21+ rm -fr $(TARGET_PATH)
22+ rm -f *.tar.gz
23+
24+ build : clean # # build target
2025
2126 mkdir -p $(TARGET_PATH) $(TARGET_PATH)/bin $(TARGET_PATH)/conf $(TARGET_PATH)/log
2227 go build $(LD_FLAGS) -o $(TARGET_PATH)/bin/$(SERVICE_NAME) cmd/$(SERVICE_NAME).go
2328 cp configs/template.yml $(TARGET_PATH)/conf
29+ cp configs/ddns.service $(TARGET_PATH)/conf
30+
31+ tag : build # # make tgz package
32+
33+ cp -r $(TARGET_PATH) $(SERVICE_NAME)
34+ tar zcvf $(SERVICE_NAME).$(VERSION).tar.gz $(SERVICE_NAME)
35+ rm -fr $(SERVICE_NAME)
2436
2537docker : build # # build docker
2638
@@ -38,7 +50,7 @@ pull: ## pull latest published docker
3850
3951 docker pull $(DOCKER_REPO)/$(SERVICE_NAME):latest
4052
41- install : build # # install by systemd
53+ install : # # install by systemd
4254
4355 cp $(TARGET_PATH)/bin/$(SERVICE_NAME) /usr/local/bin/
4456 cp configs/ddns.service /etc/systemd/system/
You can’t perform that action at this time.
0 commit comments