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

gitignore: Fix cross-platform compatibility for sed in-place editing #4540

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

praveenkumar
Copy link
Member

@praveenkumar praveenkumar commented Jan 3, 2025

  • On macOS, sed -i extension requires a space between -i and the extension
    to perform in-place changes without creating a backup file.
  • On Linux, sed -i[extension] or --in-place[extension] does not require a space,
    which makes it difficult to write a single command that works on both platforms.

As a result, the JSON backup file generated on macOS with the -e extension is ignored.

To test this change run make gen_release_info on all platform

  • Which platform have you tested the code changes on?
    • Linux
    • Windows
    • MacOS

@openshift-ci openshift-ci bot requested review from anjannath and evidolob January 3, 2025 05:49
Copy link

openshift-ci bot commented Jan 3, 2025

@praveenkumar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-crc 6df3751 link true /test e2e-crc
ci/prow/e2e-microshift-crc 6df3751 link true /test e2e-microshift-crc
ci/prow/integration-crc 6df3751 link true /test integration-crc

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

- On macOS, `sed -i extension` requires a space between `-i` and the extension
  to perform in-place changes without creating a backup file.
- On Linux, `sed -i[extension]` or `--in-place[extension]` does not require a space,
  which makes it difficult to write a single command that works on both platforms.

As a result, the JSON backup file generated on macOS with the `-e` extension is ignored.
@praveenkumar praveenkumar changed the title Makefile: provide space as part of sed extension gitignore: Fix cross-platform compatibility for sed in-place editing Jan 3, 2025
Copy link

openshift-ci bot commented Jan 3, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rohanKanojia
Once this PR has been reviewed and has the lgtm label, please ask for approval from praveenkumar. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@praveenkumar praveenkumar merged commit 5e561ad into crc-org:main Jan 3, 2025
26 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants