File tree Expand file tree Collapse file tree 3 files changed +44
-27
lines changed
Expand file tree Collapse file tree 3 files changed +44
-27
lines changed Original file line number Diff line number Diff line change 1- GOLANGCILINT_VERSION ?= 1.49.0
2-
3- # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
4- ifeq (,$(shell go env GOBIN) )
5- GOBIN =$(shell go env GOPATH) /bin
6- else
7- GOBIN =$(shell go env GOBIN)
8- endif
9-
10- GLOBAL_GOLANGCILINT := $(shell which golangci-lint)
11- GOBIN_GOLANGCILINT: = $(shell which $(GOBIN ) /golangci-lint)
12-
13- TIME_LONG = ` date +%Y-%m-%d' ' %H:%M:%S `
14- TIME_SHORT = ` date +%H:%M:%S `
15- TIME = $(TIME_SHORT )
16-
17- BLUE := $(shell printf "\033[34m")
18- YELLOW := $(shell printf "\033[33m")
19- RED := $(shell printf "\033[31m")
20- GREEN := $(shell printf "\033[32m")
21- CNone := $(shell printf "\033[0m")
22-
23- INFO = echo ${TIME} ${BLUE}[INFO]${CNone}
24- WARN = echo ${TIME} ${YELLOW}[WARN]${CNone}
25- ERR = echo ${TIME} ${RED}[FAIL]${CNone}
26- OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
27- FAIL = (echo ${TIME} ${RED}[FAIL]${CNone} && false)
1+ include makefiles/const.mk
2+ include makefiles/build.mk
283
294.PHONY : golangci
305golangci :
Original file line number Diff line number Diff line change 1+ # Build the docker image
2+ .PHONY : docker-build
3+ docker-build :
4+ docker build --build-arg=VERSION=$(VELAUX_VERSION ) --build-arg=GITVERSION=$(GIT_COMMIT ) -t $(VELAUX_IMAGE ) .
Original file line number Diff line number Diff line change 1+ SHELL := /bin/bash
2+
3+ GOLANGCILINT_VERSION ?= 1.49.0
4+
5+ # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6+ ifeq (,$(shell go env GOBIN) )
7+ GOBIN =$(shell go env GOPATH) /bin
8+ else
9+ GOBIN =$(shell go env GOBIN)
10+ endif
11+
12+ GLOBAL_GOLANGCILINT := $(shell which golangci-lint)
13+ GOBIN_GOLANGCILINT: = $(shell which $(GOBIN ) /golangci-lint)
14+
15+ # VelaUX version
16+ VELAUX_VERSION ?= main
17+ # Repo info
18+ GIT_COMMIT ?= git-$(shell git rev-parse --short HEAD)
19+ GIT_COMMIT_LONG ?= $(shell git rev-parse HEAD)
20+ VELAUX_VERSION_KEY := github.com/kubevela/velaux/version.VelaVersion
21+ VELAUX_GITVERSION_KEY := github.com/kubevela/velaux/version.GitRevision
22+ LDFLAGS ?= "-s -w -X $(VELAUX_VERSION_KEY ) =$(VELAUX_VERSION ) -X $(VELAUX_GITVERSION_KEY ) =$(GIT_COMMIT ) "
23+
24+ TIME_LONG = ` date +%Y-%m-%d' ' %H:%M:%S `
25+ TIME_SHORT = ` date +%H:%M:%S `
26+ TIME = $(TIME_SHORT )
27+
28+ BLUE := $(shell printf "\033[34m")
29+ YELLOW := $(shell printf "\033[33m")
30+ RED := $(shell printf "\033[31m")
31+ GREEN := $(shell printf "\033[32m")
32+ CNone := $(shell printf "\033[0m")
33+
34+ INFO = echo ${TIME} ${BLUE}[INFO]${CNone}
35+ WARN = echo ${TIME} ${YELLOW}[WARN]${CNone}
36+ ERR = echo ${TIME} ${RED}[FAIL]${CNone}
37+ OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
38+ FAIL = (echo ${TIME} ${RED}[FAIL]${CNone} && false)
You can’t perform that action at this time.
0 commit comments