From a333dc3a8fd989bff1449f2720a7bb341a0a5849 Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Thu, 25 May 2023 14:02:12 -0400 Subject: [PATCH] Add scripts/create-slug.sh Update scripts/README.md --- scripts/README.md | 16 ++++++++++++++-- scripts/create-slug.sh | 17 +++++++++++------ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index 6a1617b5a0..1a8ab92b0a 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,6 +1,6 @@ # PR Summary Scripts -This repository contains three scripts that allow you to generate a merged PR summary, which can be used to build change logs for releases. The scripts are designed to be run in a specific order to obtain the desired result. +This repository contains scripts to generate a merged PR summary and create a specific blog post. These scripts can be used to build change logs for releases and create blog posts for specific updates. ## Scripts @@ -9,9 +9,12 @@ The following scripts are included in this repository: - `scripts/download-prs.sh` - `scripts/distribute-merged-prs.sh` - `scripts/summarise-merged-prs.sh` +- `scripts/create-slug.sh` ## Usage +### PR Summary Scripts + To use these scripts, follow the instructions below: 1. Run the `download-prs.sh` script by executing the following command: @@ -38,6 +41,16 @@ This script will distribute the downloaded PRs based on the files they have touc This script will create summaries that can be directly pasted into change logs. +### Update creation script + +Execute the create-slug.sh script with the following command: + +```bash +./create-slug.sh +``` +This script will create a markdown file named blog/-node-cli-api.md, authored by "", with sections for updates from "" to "". It automatically runs the PR summary scripts as defined above so you can cherry pick the PRs as necessary. + + ## Additional Information - The download process may be slow, so it is beneficial to use the other scripts to automate the download. @@ -45,4 +58,3 @@ This script will create summaries that can be directly pasted into change logs. For an example of the output produced by each script, refer to the [example commit](https://github.com/input-output-hk/cardano-node/pull/5137/commits) on the official GitHub repository. -Please ensure that you have the necessary permissions and dependencies set up before running these scripts. diff --git a/scripts/create-slug.sh b/scripts/create-slug.sh index 09811e44cf..849231b7ee 100755 --- a/scripts/create-slug.sh +++ b/scripts/create-slug.sh @@ -1,9 +1,11 @@ #!/bin/bash -# Date in the format YYYY-MM-DD -DATE=$1 # Author's name -AUTHOR=$2 +AUTHOR=$1 +# Date in the format YYYY-MM-DD +DATE=$2 +# Date in the format YYYY-MM-DD +END_DATE=$3 # Check that both parameters are provided if [ -z "$DATE" ] || [ -z "$AUTHOR" ]; then @@ -13,9 +15,6 @@ if [ -z "$DATE" ] || [ -z "$AUTHOR" ]; then exit 1 fi -# End date calculated as two weeks from the provided date -END_DATE=$(date -I -d "$DATE + 14 days") - # Filename in the format YYYY-MM-DD-node-cli-api.md FILENAME="blog/${DATE}-node-cli-api.md" @@ -48,3 +47,9 @@ hide_table_of_contents: false ### cardano-testnet EOF + +source scripts/download-prs.sh input-output-hk/cardano-node + +source scripts/distribute-merged-prs.sh input-output-hk/cardano-node current $DATE $END_DATE + +source scripts/summarise-merged-prs.sh input-output-hk/cardano-node current \ No newline at end of file