From a5ddc9f55de0f2e3bc954a693b010029f3034dec Mon Sep 17 00:00:00 2001 From: Christopher Hicks Date: Tue, 3 Jun 2025 13:46:24 -0400 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A7=BC=20[just]=20generate=20clean=20?= =?UTF-8?q?readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- justfile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/justfile b/justfile index e090ca4..373ef33 100644 --- a/justfile +++ b/justfile @@ -106,6 +106,44 @@ _main_branch: @utcdate: TZ=UTC date +"%Y-%m-%d" +# generate a clean README +[group('Utility')] +[no-cd] +clean_readme: + #!/usr/bin/env bash + set -euo pipefail # strict mode without tracing + + GIT_ORIGIN=$(git config --get remote.origin.url | sed -e 's/^.*://' -e 's/[.]git$//') + #echo "$GIT_ORIGIN" + + GITHUB_ORG=$(echo "$GIT_ORIGIN" | sed -e 's/[/].*$//') + echo "org={{BLUE}}$GITHUB_ORG{{NORMAL}}" + + GITHUB_REPO=$(echo "$GIT_ORIGIN" | sed -e 's/^.*[/]//') + echo "repo={{BLUE}}$GITHUB_REPO{{NORMAL}}" + + cat > README.md << END_OF_HEREDOC + # FINI template-repo + + ![GitHub Issues](https://img.shields.io/github/issues/${GITHUB_ORG}/${GITHUB_REPO}) + ![GitHub Pull Requests](https://img.shields.io/github/issues-pr/${GITHUB_ORG}/${GITHUB_REPO}) + ![GitHub License](https://img.shields.io/github/license/${GITHUB_ORG}/${GITHUB_REPO}) + ![GitHub watchers](https://img.shields.io/github/watchers/${GITHUB_ORG}/${GITHUB_REPO}) + + A good starting place for new github repos. + + ## Contibuting + + - [Code of Conduct](.github/CODE_OF_CONDUCT.md) + - [Contributing Guide](.github/CONTRIBUTING.md) includes a step-by-step guide to our + [development processs](.github/CONTRIBUTING.md#development-process). + + ## Support + + - [Getting Support](.github/SUPPORT.md) + - [Security](.github/SECURITY.md) + END_OF_HEREDOC + # our own compliance check [group('Compliance')] compliance_check: From 00a3cfea382ad994012d937e8ed6ebf4770e1a98 Mon Sep 17 00:00:00 2001 From: Christopher Hicks Date: Tue, 3 Jun 2025 13:49:27 -0400 Subject: [PATCH 2/4] add just release --- justfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/justfile b/justfile index 373ef33..e412e2b 100644 --- a/justfile +++ b/justfile @@ -226,3 +226,8 @@ compliance_check: echo "{{RED}}You do NOT have a justfile. Feeling the FOMO yet?{{NORMAL}}" echo "{{RED}}And this should not be possible. Tell me how you got here.{{NORMAL}}" fi + +# make a release +[group('Process')] +release rel_version: _on_a_branch + gh release create {{rel_version}} --generate-notes From 822fd027a7dd4ad83e1b2fa867967119c9f2c69b Mon Sep 17 00:00:00 2001 From: Christopher Hicks Date: Tue, 3 Jun 2025 13:49:37 -0400 Subject: [PATCH 3/4] document new recipes --- .github/CONTRIBUTING.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e811d4c..be2149f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -58,19 +58,21 @@ You should get a more colorful version of this: just --list Available recipes: [Compliance] - compliance_check # our own compliance check + compliance_check # our own compliance check [Process] - branch branchname # start a new branch - merge # merge PR and return to starting point - pr # PR create 3.0 - prweb # view PR in web browser - sync # escape from branch, back to starting point + branch branchname # start a new branch + merge # merge PR and return to starting point + pr # PR create 3.0 + prweb # view PR in web browser + release rel_version # make a release + sync # escape from branch, back to starting point [Utility] - utcdate # print UTC date in ISO format + clean_readme # generate a clean README + utcdate # print UTC date in ISO format [example] - list # list recipes (default works without naming it) + list # list recipes (default works without naming it) Your justfile is waiting for more scripts and snippets ``` From 7429eb8fd90279c6f455984ea0865b0300ce6284 Mon Sep 17 00:00:00 2001 From: Christopher Hicks Date: Tue, 3 Jun 2025 13:51:03 -0400 Subject: [PATCH 4/4] release anytime --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index e412e2b..d4d1b19 100644 --- a/justfile +++ b/justfile @@ -229,5 +229,5 @@ compliance_check: # make a release [group('Process')] -release rel_version: _on_a_branch +release rel_version: gh release create {{rel_version}} --generate-notes