-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbcef89
commit 34c6d32
Showing
18 changed files
with
62 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
SHELL := /bin/bash | ||
BASE_DIR = $(shell pwd) | ||
SRV_NAME=dbactuator_redis | ||
VERSION = 0.0.1 | ||
|
||
PACKAGE_PATH="dbm-services/redis/db-tools/dbactuator/cmd" | ||
|
||
BUILD_FLAG = " -X ${PACKAGE_PATH}.version=${VERSION} -X ${PACKAGE_PATH}.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%z'` -X ${PACKAGE_PATH}.githash=`git rev-parse HEAD` " | ||
|
||
build: | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -gcflags="all=-trimpath=${PWD}" -asmflags="all=-trimpath=${PWD}" -ldflags ${BUILD_FLAG} -o ${BASE_DIR}/build/$(SRV_NAME) -v main.go | ||
|
||
clean: | ||
-rm ./bin/${SRV_NAME} | ||
|
||
build:clean | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/$(SRV_NAME) -v main.go | ||
|
||
.PHONY: init clean build | ||
.PHONY: init clean build all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
SRV_NAME=bk-dbmon | ||
|
||
clean: | ||
-rm ./bin/${SRV_NAME} | ||
|
||
build:clean | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/$(SRV_NAME) -v main.go | ||
|
||
build: | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./build/$(SRV_NAME) -v main.go | ||
|
||
LOCAL_PKG_DIR := $(shell eval "./bin/bk-dbmon -v|awk '{print $2}'") | ||
version:=$(shell sh -c "./bin/bk-dbmon -v|awk '{print $1}'") | ||
|
||
package:build | ||
mkdir -p bkdbmon | ||
cp ./bin/$(SRV_NAME) ./bkdbmon/ | ||
cp ./start.sh ./bkdbmon/ | ||
cp ./stop.sh ./bkdbmon/ | ||
cp ./dbmon-config.yaml ./bkdbmon/ | ||
clean: | ||
-rm ./build/${SRV_NAME} | ||
|
||
version:build | ||
@echo LOCAL_PKG_DIR=$(LOCAL_PKG_DIR) | ||
@echo version=$(version) | ||
|
||
.PHONY: init clean build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
SRV_NAME= redis_dts_server | ||
binDir=bin | ||
|
||
clean: | ||
-rm ./${binDir}/${SRV_NAME} | ||
|
||
build:clean | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./${binDir}/$(SRV_NAME) -v main.go | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./build/$(SRV_NAME) -v main.go | ||
|
||
clean: | ||
-rm ./build/${SRV_NAME} | ||
|
||
.PHONY: init clean build gotool clean help api curl |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters