Skip to content

Commit 5133309

Browse files
authored
📚 [just] cleaner list of recipes and document process (#4)
1 parent a37b3e7 commit 5133309

File tree

2 files changed

+47
-6
lines changed

2 files changed

+47
-6
lines changed

.github/CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,47 @@ unless a screen shot is the only way to convey your problem.
2828
- Open a pull request on github.
2929
- Check the github actions on your PR to see if there's anything to fix.
3030

31+
## Development requirements
32+
33+
- `just`
34+
- `gh` - github CLI
35+
- `bash`
36+
37+
## Development process
38+
3139
The [justfile](../justfile) is used for centralizing snippets for build
3240
and many other purposes. Run `just` anywhere in the repo to see which
3341
subcommands are available here.
42+
43+
The full development cycle works via the command line.
44+
45+
1. Starting with a cloned repo, run `just branch $some-name`
46+
1. Make some changes and make sure your last commit message convey your overall
47+
purpose.
48+
1. Run `just pr` and it will create a PR based on your last commit message.
49+
1. Optionally, you can make other commits or update the PR description.
50+
1. Finally, `just merge` will merge the PR with squashed commit history and
51+
cleaned up branches locally and remotely. You'll end up with a repo back
52+
on `main` (release) branch with the latest `git pull`ed.
53+
54+
```bash
55+
% just
56+
just --list
57+
Available recipes:
58+
[Compliance]
59+
compliance_check # our own compliance check
60+
61+
[Process]
62+
branch branchname # start a new branch
63+
merge # merge PR and return to starting point
64+
pr # PR create 3.0
65+
prweb # view PR in web browser
66+
sync # escape from branch, back to starting point
67+
68+
[Utility]
69+
utcdate # print UTC date in ISO format
70+
71+
[example]
72+
list # list recipes (default works without naming it)
73+
Your justfile is waiting for more scripts and snippets
74+
```

justfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sync:
2222

2323
# PR create 3.0
2424
[group('Process')]
25-
pr: on_a_branch
25+
pr: _on_a_branch
2626
#!/usr/bin/env bash
2727
set -euxo pipefail # strict mode
2828

@@ -60,24 +60,24 @@ pr: on_a_branch
6060
[group('Process')]
6161
merge:
6262
gh pr merge -s -d
63-
just sync
63+
just sync # mostly redundant, but just in case
6464

6565
# start a new branch
6666
[group('Process')]
67-
branch branchname: main_branch
67+
branch branchname: _main_branch
6868
#!/usr/bin/env bash
6969
NOW=`just utcdate`
7070
git co -b "chicks/$NOW-{{ branchname }}"
7171

7272
# view PR in web browser
7373
[group('Process')]
74-
prweb: on_a_branch
74+
prweb: _on_a_branch
7575
gh pr view --web
7676

7777
# error if not on a git branch
7878
[group('sanity check')]
7979
[no-cd]
80-
on_a_branch:
80+
_on_a_branch:
8181
#!/bin/bash
8282

8383
# thanks to https://stackoverflow.com/a/12142066/2002471
@@ -90,7 +90,7 @@ on_a_branch:
9090
# error if not on the release branch
9191
[group('sanity check')]
9292
[no-cd]
93-
main_branch:
93+
_main_branch:
9494
#!/bin/bash
9595

9696
# thanks to https://stackoverflow.com/a/12142066/2002471

0 commit comments

Comments
 (0)