Skip to content

Commit

Permalink
revert VERSION file deletion as unit test require it
Browse files Browse the repository at this point in the history
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
  • Loading branch information
shubham14bajpai committed Jul 17, 2020
1 parent 14e9ce8 commit 108c5db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.12.0
18 changes: 3 additions & 15 deletions buildscripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,18 @@ fi

# Get the version details
VERSION_META="$(cat $GOPATH/src/github.com/openebs/maya/BUILDMETA)"
# Determine the current branch
CURRENT_BRANCH=""
if [ -z "${TRAVIS_BRANCH}" ];
then
CURRENT_BRANCH=$(git branch | grep "\*" | cut -d ' ' -f2)
else
CURRENT_BRANCH="${TRAVIS_BRANCH}"
fi

## Populate the version based on release tag
## If travis tag is set then assign it as VERSION and
## if travis tag is empty then mark version as ci
## If travis tag is set then assign it as VERSION
## take the version from the file
if [ -n "$TRAVIS_TAG" ]; then
# Trim the `v` from the TRAVIS_TAG if it exists
# Example: v1.10.0 maps to 1.10.0
# Example: 1.10.0 maps to 1.10.0
# Example: v1.10.0-custom maps to 1.10.0-custom
VERSION="${TRAVIS_TAG#v}"
else
## Marking VERSION as current_branch-dev
## Example: master branch maps to master-dev
## Example: v1.11.x-ee branch to 1.11.x-ee-dev
## Example: v1.10.x branch to 1.10.x-dev
VERSION="${CURRENT_BRANCH#v}-dev"
VERSION="$(cat $GOPATH/src/github.com/openebs/maya/VERSION)"
fi
echo "Building for ${VERSION} VERSION"

Expand Down
2 changes: 0 additions & 2 deletions pkg/util/unstructured.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ import (

// GetNestedField returns a nested field from the provided map
func GetNestedField(obj map[string]interface{}, fields ...string) interface{} {
fmt.Println("obj", obj)
fmt.Println("fields", fields)
var val interface{} = obj
for _, field := range fields {
if _, ok := val.(map[string]interface{}); !ok {
Expand Down

0 comments on commit 108c5db

Please sign in to comment.