Commit cc8624f1 authored by root's avatar root

add Makefile

parent c7d696ba
.PHONY: build clean tool lint help .PHONY: build clean tool lint help
check=$(shell if [ ! -d "./build/" ]; then mkdir build; else echo "exist"; fi;)
version=$(shell ./version.sh)
tarfile = $(shell echo "build/chain33-pai_$(version).tar.gz" | sed s/[[:space:]]//g)
all: build all: build
test:
@go build -v .
@rm -rf build/chain33-pai
@mkdir build/chain33-pai
@cp chain33-pai build/chain33-pai
@cp *.sh build/chain33-pai
@cp -r scripts build/chain33-pai
@chmod +x build/chain33-pai/*.sh
@chmod +x build/chain33-pai/scripts/*.sh
@tar cvfpz $(tarfile) build/chain33-pai
@echo "ok"
build: build:
@go build -v . @go build -v .
tool: tool:
go vet ./...; true go vet ./...; true
gofmt -w . gofmt -w .
......
...@@ -4,6 +4,7 @@ go 1.13 ...@@ -4,6 +4,7 @@ go 1.13
require ( require (
github.com/33cn/chain33 v0.0.0-20200401084506-79a60df8a353 github.com/33cn/chain33 v0.0.0-20200401084506-79a60df8a353
github.com/33cn/plugin v0.0.0-20200401090725-74f0baacfc4e
github.com/360EntSecGroup-Skylar/excelize v1.4.1 github.com/360EntSecGroup-Skylar/excelize v1.4.1
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/astaxie/beego v1.12.1 github.com/astaxie/beego v1.12.1
......
This diff is collapsed.
package app package app
const version = "0.2.0" const version = "0.2.1"
func GetVersion() string { func GetVersion() string {
return version return version
......
#!/bin/sh
cat pkg/app/version.go | grep const | awk '{print $4}' | awk -F'"' '{print $2}' | xargs echo -n
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment