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

Fix overly match-happy sed commands #45

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

mcdonnnj
Copy link
Member

🗣 Description

This pull request tightens a couple of sed commands so that their regexps do not inadvertently match when they should not.

💭 Motivation and context

We made similar changes in cisagov/skeleton-python-library#104 and they should be made here as well.

🧪 Testing

I tested locally and verified that with these changes the script behave as expected.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

We saw in cisagov/postfix-docker#47 that the sed commands in the
bump_version.sh script could inadvertently match the CC0 version in
the README.md file.  This change escapes the periods in the version
before passing it on to sed so that they only match periods and not
just any character.

Co-authored-by: Shane Frasier <[email protected]>
@mcdonnnj mcdonnnj added the bug This issue or pull request addresses broken functionality label Sep 26, 2024
@mcdonnnj mcdonnnj self-assigned this Sep 26, 2024
@mcdonnnj mcdonnnj enabled auto-merge September 26, 2024 20:00
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

👍

@mcdonnnj mcdonnnj requested a review from a team September 26, 2024 20:39
@mcdonnnj mcdonnnj merged commit f56abcc into develop Sep 26, 2024
4 checks passed
@mcdonnnj mcdonnnj deleted the bug/fix_overly_matching_sed_command branch September 26, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants