Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ else
LIBVIRT_BUILD_TAG=
endif

COMMIT=`git describe --dirty --always --tags 2> /dev/null || true`
GOLDFLAGS="-X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
HYPER_BULD_TAGS=$(XEN_BUILD_TAG) $(LIBVIRT_BUILD_TAG)

all-local: build-runv
clean-local:
-rm -f runv
install-exec-local:
$(INSTALL_PROGRAM) runv $(bindir)

build-runv:
go build -tags "static_build $(HYPER_BULD_TAGS)" -o runv .
go build -tags "static_build $(HYPER_BULD_TAGS)" -ldflags ${GOLDFLAGS} -o runv .
test-integration:
cd integration-test/test_data && make
cd integration-test && go test -check.v -test.timeout=120m ${TESTFLAGS} .
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ import (
"google.golang.org/grpc/grpclog"
)

var (
version = ""
gitCommit = ""
)

const (
version = "0.8.1"
specConfig = "config.json"
stateJson = "state.json"
usage = `Open Container Initiative hypervisor-based runtime
Expand Down Expand Up @@ -59,7 +63,7 @@ func main() {
app := cli.NewApp()
app.Name = "runv"
app.Usage = usage
app.Version = version
app.Version = fmt.Sprintf("%s, commit: %s", version, gitCommit)
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "debug",
Expand Down