Skip to content

Commit

Permalink
Merge pull request #34 from jhernand/add_support_for_windows
Browse files Browse the repository at this point in the history
Add support for Windows
  • Loading branch information
jhernand authored Dec 2, 2019
2 parents 394759c + b1fc682 commit f401673
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ clean:
$$(ls cmd) \
*-darwin-amd64 \
*-linux-amd64 \
*-windows-amd64 \
*.sha256 \
$(NULL)
3 changes: 2 additions & 1 deletion build_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ function build_cmds {
}

# Build for Linux and macOS:
build_cmds linux amd64
build_cmds darwin amd64
build_cmds linux amd64
build_cmds windows amd64

# Bye:
exit 0
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.10.3
github.com/onsi/gomega v1.5.0
github.com/openshift-online/ocm-sdk-go v0.1.54
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down
6 changes: 3 additions & 3 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

"github.com/dgrijalva/jwt-go"
"github.com/golang/glog"
"github.com/mitchellh/go-homedir"
"github.com/openshift-online/ocm-sdk-go"

"github.com/openshift-online/ocm-cli/pkg/debug"
Expand Down Expand Up @@ -116,9 +117,8 @@ func Remove() error {

// Location returns the location of the configuration file.
func Location() (path string, err error) {
home := os.Getenv("HOME")
if home == "" {
err = fmt.Errorf("can't find home directory, HOME environment variable is empty")
home, err := homedir.Dir()
if err != nil {
return
}
path = filepath.Join(home, ".ocm.json")
Expand Down

0 comments on commit f401673

Please sign in to comment.