-
Notifications
You must be signed in to change notification settings - Fork 39
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
base: main
Are you sure you want to change the base?
Conversation
[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 |
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 |
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.
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
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.
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!
Sed commands still fail for me on Linux/BASH:
|
Finally got around to fixing this. @jberkus Can you try now? |
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