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

Use embed for static assets #25

Merged
merged 2 commits into from Jun 25, 2021
Merged

Conversation

jsafrane
Copy link
Contributor

@jsafrane jsafrane commented Jun 18, 2021

Remove bindata and use go:embed for static assets.

go:embed can embed files only in the directory where it's used and its subdirs, therefore add assets.go to /assets/. No .. or symlinks can be used to trick go:embed.

Updated library-go as a prerequisite.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 18, 2021
assets/assets.go Outdated
"embed"
)

//go:embed *
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//go:embed *
//go:embed *.yaml rbac/*.yaml

I recommend to explicitly define what files you are going to include in the embed.FS to prevent adding assets.go there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@jsafrane jsafrane force-pushed the embed branch 3 times, most recently from 571c9fb to 06d1f80 Compare June 21, 2021 11:39
@jsafrane
Copy link
Contributor Author

/hold
for openshift/library-go#1117

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2021
Move from bindata to embed to get rid of "make update".
@jsafrane
Copy link
Contributor Author

/retest

Copy link
Contributor

@Fedosin Fedosin left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 25, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Fedosin, jsafrane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jsafrane
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2021
@openshift-merge-robot openshift-merge-robot merged commit 40f4f26 into openshift:master Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants