github.com/aswedchain/aswed@v1.0.1/deployment/cross/Makefile (about)

     1  PROJECT_ROOT_DIR = ../..
     2  ENTRY_FILE_GETH_DIR = github.com/aswedchain/aswed/cmd/geth
     3  ENTRY_FILE_BOOTNODE_DIR = github.com/aswedchain/aswed/cmd/bootnode
     4  GROUP_NAME = huobichain.com
     5  SERVICE_NAME_BOOTNODE = bootnode
     6  SERVICE_NAME_MINER = miner
     7  BIN_REVISION_STRING := $(shell git show -s --pretty=format:%h)
     8  GIT_TIME := $(shell git show -s --pretty=format:%cI)
     9  
    10  build_linux_node:
    11  	xgo2 --targets=linux/amd64 -ldflags "-s -w -X 'main.gitCommit=${BIN_REVISION_STRING}' -X 'main.gitDate=${GIT_TIME}'" -out geth --pkg=${ENTRY_FILE_GETH_DIR} ${PROJECT_ROOT_DIR}
    12  
    13  devtools:
    14  	go get -u github.com/youchainhq/xgo2
    15  
    16  all: docker_bootnode docker_miner
    17  
    18  build_linux_bootnode:
    19  	xgo2 --targets=linux/amd64 -ldflags "-s -w" -out bootnode --pkg=${ENTRY_FILE_BOOTNODE_DIR} ${PROJECT_ROOT_DIR}
    20  
    21  docker_bootnode:build_linux_bootnode
    22  	docker build -f ./Dockerfile-Bootnode -t ${GROUP_NAME}/${SERVICE_NAME_BOOTNODE}:${BIN_REVISION_STRING} .
    23  	docker tag ${GROUP_NAME}/${SERVICE_NAME_BOOTNODE}:${BIN_REVISION_STRING} ${GROUP_NAME}/${SERVICE_NAME_BOOTNODE}:latest
    24  
    25  docker_miner:build_linux_node
    26  	docker build -f ./Dockerfile-Miner -t ${GROUP_NAME}/${SERVICE_NAME_MINER}:${BIN_REVISION_STRING} .
    27  	docker tag ${GROUP_NAME}/${SERVICE_NAME_MINER}:${BIN_REVISION_STRING} ${GROUP_NAME}/${SERVICE_NAME_MINER}:latest
    28  
    29  clean:
    30  	rm -rf geth-* bootnode-*