Skip to content

Commit

Permalink
consider the filtermanager & plugins hub is ready to release 0.1.0 (#75)
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander authored Dec 1, 2023
1 parent 86fca58 commit 7790c3a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PROXY_IMAGE ?= envoyproxy/envoy@sha256:1fa13772ad01292fdbd73541717ef1a65fcdb
# We may need to use timestamp if we need to update the image in one PR
DEV_TOOLS_IMAGE ?= ghcr.io/mosn/htnn-dev-tools:2023-10-23

MAJOR_VERSION = $(shell cat VERSION)
VERSION = $(shell cat VERSION)
GIT_VERSION = $(shell git log -1 --pretty=format:%h)

# Define a recursive wildcard function
Expand Down Expand Up @@ -61,7 +61,7 @@ unit-test:
.PHONY: build-test-so-local
build-test-so-local:
CGO_ENABLED=1 go build -tags so \
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${MAJOR_VERSION}(${GIT_VERSION})" \
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${VERSION}(${GIT_VERSION})" \
--buildmode=c-shared \
-v -o plugins/tests/integration/${TARGET_SO} \
${PROJECT_NAME}/plugins/tests/integration/libgolang
Expand All @@ -87,7 +87,7 @@ plugins-integration-test:
.PHONY: build-so-local
build-so-local:
CGO_ENABLED=1 go build -tags so \
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${MAJOR_VERSION}(${GIT_VERSION})" \
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${VERSION}(${GIT_VERSION})" \
--buildmode=c-shared \
-v -o ${TARGET_SO} \
${PROJECT_NAME}/cmd/libgolang
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.0
v0.1.0
7 changes: 6 additions & 1 deletion controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ CONTAINER_TOOL ?= docker
SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec

VERSION = $(shell cat ../VERSION)
GIT_VERSION = $(shell git log -1 --pretty=format:%h)

.PHONY: all
all: build

Expand Down Expand Up @@ -61,7 +64,9 @@ test: manifests generate envtest ## Run tests.

.PHONY: build
build: manifests generate
go build -o bin/manager cmd/main.go
CGO_ENABLED=0 go build \
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${VERSION}(${GIT_VERSION})" \
-o bin/manager cmd/main.go

.PHONY: run
run: manifests generate ## Run a controller from your host.
Expand Down
5 changes: 5 additions & 0 deletions controller/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ import (
"mosn.io/moe/controller/internal/controller"
)

// Version is specified by build tag, in VERSION file
var (
Version string = ""
)

var (
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
Expand Down

0 comments on commit 7790c3a

Please sign in to comment.