Skip to content

Update setup script to create branch and markdown header with correct date #476

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sreeram-venkitesh
Copy link
Member

script.sh can be used to create the branch and the issue template easily every week. The date command uses -sun to get the correct date for each week's issue.

CC: @jberkus @fykaa

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 26, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sreeram-venkitesh

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 26, 2025
script.sh Outdated
cp template.md ./_posts/$NEW_DATE-update.md

sed -i '' "s/2025-01-20/$(date -v -sun +"%Y-%m-%d")/g" ./_posts/$NEW_DATE-update.md
Copy link
Member

Choose a reason for hiding this comment

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

This script looks good, I just think date -v is BSD specific, so it may not work on Linux

and ig replacing hardcoded dates in sed with variables could make future edits easier

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that! I've pushed some changes. I tried running the date -d command in a linux box but didn't clone lwkd and try out the entire script. Please take a look!

@jberkus
Copy link
Contributor

jberkus commented Feb 25, 2025

Sed commands still fail for me on Linux/BASH:

sed: can't read s/2025-01-22/2025-02-25/g: No such file or directory
sed: can't read s/Month DD/February 23/g: No such file or directory

@sreeram-venkitesh
Copy link
Member Author

Finally got around to fixing this. @jberkus Can you try now?

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants