-
Notifications
You must be signed in to change notification settings - Fork 26
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
improve dev UX by removing unnecessary toil #236
improve dev UX by removing unnecessary toil #236
Conversation
sthaha
commented
Sep 15, 2023
•
edited
Loading
edited
- removes unnecessary rebases due to bundle generation
- Adds make target for installing oc
- Removes (ab)use of [[ $(command -v ...) ]] with command -v
Previously, `make bundle` will update the `createdAt` of the bundle CSV file even if there aren't any changes to the config. This requires PRs to be rebased to resolve the conflict in createdAt. This PR changes the bundle generation to revert the CSV file if the only change detected is for the `createdAt` timestamp, there by saving us from unnecessary rebases. Signed-off-by: Sunil Thaha <[email protected]>
Makefile
Outdated
@@ -265,6 +265,10 @@ operator-sdk: ## Download operator-sdk locally if necessary. | |||
yq: ## Download yq locally if necessary | |||
@./hack/tools.sh yq | |||
|
|||
.PHONY: oc | |||
oc: ## Download yq locally if necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment says yq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)
|
||
if git diff --ignore-matching-lines='createdAt:' --exit-code "$csv_file" >/dev/null; then | ||
info "no changes to $(basename $csv_file) detected; resetting it" | ||
run git checkout -- "$csv_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it safe to do git checkout
from script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, the git diff explicitly checks if the only change is in createdAt ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Adds make target for installing oc * Removes (ab)use of [[ $(command -v ...) ]] with command -v Signed-off-by: Sunil Thaha <[email protected]>