Skip to content

Commit 3a93566

Browse files
author
zhilingc
committed
Directory changes
1 parent 491d5f6 commit 3a93566

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+615
-587
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
.PHONY: go
1+
VERSION_FILE=VERSION
2+
FEAST_VERSION=`cat $(VERSION_FILE)`
23

34
build-deps:
45
$(MAKE) -C protos gen-go
56
dep ensure
67

78
build-cli:
9+
$(MAKE) build-deps
810
$(MAKE) -C cli build-all
911

10-
install-cli:
11-
@$(MAKE) build-deps
12-
cd cli/feast && go install
12+
build-java:
13+
mvn clean verify -Drevision=$(FEAST_VERSION)
1314

1415
build-docker:
1516
docker build -t $(registry)/feast-core:$(version) -f docker/core/Dockerfile .

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.3.0

cli/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.PHONY: go
2+
VERSION_FILE=../VERSION
3+
FEAST_VERSION=`cat $(VERSION_FILE)`
24

35
build-all:
46
@$(MAKE) cli-linux cli-darwin
@@ -8,10 +10,14 @@ cli-linux:
810
mkdir -p bin
911
export GOOS=linux; \
1012
export GOARCH=amd64; \
11-
mkdir -p bin/$$GOOS-$$GOARCH && go build -o bin/$$GOOS-$$GOARCH/feast feast/main.go
13+
mkdir -p bin/$$GOOS-$$GOARCH && go build \
14+
-ldflags "-X main.Version=$(FEAST_VERSION)" \
15+
-o bin/$$GOOS-$$GOARCH/feast feast/main.go
1216

1317
.PHONY: cli-darwin
1418
cli-darwin:
1519
export GOOS=darwin; \
1620
export GOARCH=amd64; \
17-
mkdir -p bin/$$GOOS-$$GOARCH && go build -o bin/$$GOOS-$$GOARCH/feast feast/main.go
21+
mkdir -p bin/$$GOOS-$$GOARCH && go build \
22+
-ldflags "-X main.Version=$(FEAST_VERSION)" \
23+
-o bin/$$GOOS-$$GOARCH/feast feast/main.go

cli/feast/cmd/apply.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"path/filepath"
2323

2424
"github.com/gojektech/feast/cli/feast/pkg/parse"
25-
"github.com/gojektech/feast/go-feast-proto/feast/core"
25+
"github.com/gojektech/feast/protos/generated/go/feast/core"
2626

2727
"github.com/spf13/cobra"
2828
)

cli/feast/cmd/jobs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/gojektech/feast/cli/feast/pkg/parse"
2424
"github.com/gojektech/feast/cli/feast/pkg/printer"
25-
"github.com/gojektech/feast/go-feast-proto/feast/core"
25+
"github.com/gojektech/feast/protos/generated/go/feast/core"
2626

2727
"github.com/spf13/cobra"
2828
)

cli/feast/cmd/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"text/tabwriter"
2424

2525
"github.com/gojektech/feast/cli/feast/pkg/util"
26-
"github.com/gojektech/feast/go-feast-proto/feast/core"
26+
"github.com/gojektech/feast/protos/generated/go/feast/core"
2727

2828
"github.com/golang/protobuf/ptypes/empty"
2929
"github.com/spf13/cobra"

cli/feast/cmd/version.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,22 @@ import (
2020
"github.com/spf13/cobra"
2121
)
2222

23-
var version = "0.3.0"
23+
// Version is the cli version, injected at compile time
24+
var version string
2425

2526
var versionCmd = &cobra.Command{
2627
Use: "version",
2728
Short: "feast cli version",
2829
Run: func(cmd *cobra.Command, args []string) {
29-
fmt.Printf("CLI version: %s\n", version)
30+
fmt.Println(version)
3031
},
3132
}
3233

3334
func init() {
3435
rootCmd.AddCommand(versionCmd)
3536
}
37+
38+
// SetVersion sets the version to the given version.
39+
func SetVersion(v string) {
40+
version = v
41+
}

cli/feast/main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414

1515
package main
1616

17-
import "github.com/gojektech/feast/cli/feast/cmd"
17+
import (
18+
"github.com/gojektech/feast/cli/feast/cmd"
19+
)
20+
21+
// Version is the Feast version
22+
var Version string
1823

1924
func main() {
25+
cmd.SetVersion(Version)
2026
cmd.Execute()
2127
}

cli/feast/pkg/parse/yaml.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323

2424
"github.com/ghodss/yaml"
2525

26-
"github.com/gojektech/feast/go-feast-proto/feast/specs"
27-
"github.com/gojektech/feast/go-feast-proto/feast/types"
26+
"github.com/gojektech/feast/protos/generated/go/feast/specs"
27+
"github.com/gojektech/feast/protos/generated/go/feast/types"
2828
)
2929

3030
// YamlToFeatureSpec parses the given yaml and outputs the corresponding

cli/feast/pkg/parse/yaml_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919

2020
"github.com/golang/protobuf/ptypes/timestamp"
2121

22-
"github.com/gojektech/feast/go-feast-proto/feast/specs"
23-
"github.com/gojektech/feast/go-feast-proto/feast/types"
22+
"github.com/gojektech/feast/protos/generated/go/feast/specs"
23+
"github.com/gojektech/feast/protos/generated/go/feast/types"
2424

2525
"github.com/google/go-cmp/cmp"
2626
)

0 commit comments

Comments
 (0)