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

Add support for buildpack API v0.5 #121

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

sambhav
Copy link
Contributor

@sambhav sambhav commented Feb 28, 2021

Summary

Adds support for BP API v0.5

Fixes #85

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.

@sambhav sambhav requested a review from a team as a code owner February 28, 2021 14:54
@sambhav sambhav force-pushed the api/0.5 branch 4 times, most recently from a02861d to 7224939 Compare February 28, 2021 15:06
build.go Outdated
Comment on lines 258 to 264
oldAPI := false
apiV05, _ := semver.NewVersion("0.5")
if version, err := semver.NewVersion(buildpackInfo.APIVersion); err != nil {
config.exitHandler.Error(err)
return
} else if version.LessThan(apiV05) {
oldAPI = true
}
Copy link
Member

Choose a reason for hiding this comment

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

Rather than recording this in a variable, oldAPI, that will likely be superseded as soon as a newer API version comes out, can we just record the API version specified in the buildpack and then do the comparisons in the locations that oldAPI appears below? This would be helpful to future developers as they would more easily understand the code in that location.

@sophiewigmore
Copy link
Member

sophiewigmore commented Mar 2, 2021

These changes look pretty solid to me! +1 to Ryan's comment above.

@sambhav
Copy link
Contributor Author

sambhav commented Mar 2, 2021

Thanks, should be fixed now :)

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.

Add support for build and launch bill-of-materials
3 participants