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

Support csproj files for identifying .NET Core projects #11896

Merged
merged 1 commit into from
Nov 21, 2016

Conversation

jim-minter
Copy link
Contributor

Fixes #11842

@bparees ptal - I removed DetectLiteralDotNet() because I couldn't see how it could possibly be triggered?


// DetectLiteralDotNet detects .NET source and matches it to a .net supported annotation
func DetectLiteralDotNet(dir string) (*Info, bool) {
return detect(".net", dir, "project.json")
Copy link
Contributor

Choose a reason for hiding this comment

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

this matches to imagestreams with a "supports" annotation with value of ".net"

return true
func detectGlob(platform string, dir string, globs ...string) *Info {
for _, g := range globs {
if matches, _ := filepath.Glob(filepath.Join(dir, g)); len(matches) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we not just do globbing in the existing detect function, regardless of whether the passed pattern contains a * ?

@jim-minter
Copy link
Contributor Author

All changes made, thanks.

return detect("perl", dir, "index.pl", "cpanfile")
}

// DetectScala detects Scala source
func DetectScala(dir string) (*Info, bool) {
func DetectScala(dir string) *Info {
return detect("scala", dir, "build.sbt")
}

// DetectDotNet detects .NET source and matches it to a dotnet supported annotatin or dotnet imagestream name
Copy link
Contributor

Choose a reason for hiding this comment

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

annotation (i know, not your fault but it's bugging me now :) )

Copy link
Contributor

@bparees bparees left a comment

Choose a reason for hiding this comment

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

one nit and lgtm.

@bparees bparees added this to the 1.5.0 milestone Nov 14, 2016
@jim-minter
Copy link
Contributor Author

Done.

@bparees
Copy link
Contributor

bparees commented Nov 14, 2016

lgtm for post 3.4 merge.

@bparees
Copy link
Contributor

bparees commented Nov 16, 2016

[merge]

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@bparees
Copy link
Contributor

bparees commented Nov 17, 2016

# github.com/openshift/origin/pkg/generate/app
pkg/generate/app/strategyref_test.go:11: cannot use fakeDetector (type func(string) (*source.Info, bool)) as type source.DetectorFunc in array or slice literal

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 7cc7460

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11593/) (Base Commit: 3b2bbe5)

@bparees
Copy link
Contributor

bparees commented Nov 21, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 7cc7460

@openshift-bot
Copy link
Contributor

openshift-bot commented Nov 21, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11603/) (Base Commit: 57f69c1) (Image: devenv-rhel7_5393)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants