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 ``` diff --git a/justfile b/justfile index e090ca4..d4d1b19 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: @@ -188,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: + gh release create {{rel_version}} --generate-notes