Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixBuild #12

Merged
merged 2 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module github.com/cli-playground/devfile-parser
go 1.14

require (
github.com/docker/docker v1.13.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do go mod tidy to reflect these changes on go.sum

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. WIll be adding this to the github actions going further.

github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.4.0 // indirect
github.com/fatih/color v1.9.0
github.com/fsnotify/fsnotify v1.4.7
github.com/ghodss/yaml v1.0.0
github.com/gobwas/glob v0.2.3
Expand Down
11 changes: 6 additions & 5 deletions pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func In(arr []string, value string) bool {
return false
}

// Hyphenate applicationName and componentName
//NamespaceOpenShiftObject Hyphenate applicationName and componentName
func NamespaceOpenShiftObject(componentName string, applicationName string) (string, error) {

// Error if it's blank
Expand Down Expand Up @@ -168,6 +168,7 @@ func ParseComponentImageName(imageName string) (string, string, string, string)
return componentImageName, componentType, componentName, componentVersion
}

//WIN for windows
const WIN = "windows"

// ReadFilePath Reads file path form URL file:///C:/path/to/file to C:\path\to\file
Expand Down Expand Up @@ -316,10 +317,10 @@ func removeNonAlphaSuffix(input string) string {
if matchesLength == 0 {
// in this case the string does not contain a non-alphanumeric suffix
return input
} else {
// in this case we return the smallest match which in the last element in the array
return matches[matchesLength-1]
}
// in this case we return the smallest match which in the last element in the array
return matches[matchesLength-1]

}

// SliceDifference returns the values of s2 that do not exist in s1
Expand Down Expand Up @@ -808,7 +809,7 @@ func GetGitHubZipURL(repoURL string) (string, error) {
client := github.NewClient(nil)
opt := &github.RepositoryContentGetOptions{Ref: branch}

URL, response, err := client.Repositories.GetArchiveLink(context.Background(), owner, repo, "zipball", opt, true)
URL, response, err := client.Repositories.GetArchiveLink(context.Background(), owner, repo, "zipball", opt)
if err != nil {
errMessage := fmt.Sprintf("Error getting zip url. Response: %s.", response.Status)
return url, errors.New(errMessage)
Expand Down