File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -euo pipefail
4
4
5
+ # Uses https://github.com/charmbracelet/freeze/pull/113
6
+ freeze_path=" ${FREEZE:- freeze} "
7
+ trunk_path=../trunk/bazel-bin/trunk/cli/cli
8
+
5
9
function freeze_linter() {
6
- freeze --theme=dracula - o " ${2} " --execute " bash -c 'echo $ ${1} ; ${1} || true '"
10
+ ${freeze_path} --theme=catppuccin-mocha --execute-non-zero - o " ${2} " --execute " bash -c 'echo $ ${1} ; ${1} '"
7
11
}
8
12
9
13
function freeze_trunk() {
10
- freeze --theme=dracula -o " ${2/ tb/ trunk} " --execute " bash -c '${1} --no-progress --show-existing'"
14
+ # freeze does not support ending with an ANSI escape code, so add empty text
15
+ # Also modify the color codes to work better for freeze's themes.
16
+ ${freeze_path} --theme=catppuccin-mocha --execute-non-zero -o " ${2} " --execute " bash -c 'echo $ ${1/ ${trunk_path} / trunk} ; ${1} --no-progress --show-existing --upstream=false | sed s/✖/x/ | sed s/30m/104m/; echo -n \" \" '"
11
17
}
12
18
13
19
mkdir -p screenshots
14
20
15
21
# Requires a pre-release version of Trunk
16
- tb=../trunk/bazel-bin/trunk/cli/cli
17
- freeze_trunk " ${tb} check --filter=markdownlint test_data.md" " screenshots/markdownlint_trunk.png"
22
+ freeze_trunk " ${trunk_path} check --filter=markdownlint test_data.md" " screenshots/markdownlint_trunk.png"
18
23
freeze_linter " .trunk/tools/markdownlint -r markdownlint-rule-search-replace test_data.md" " screenshots/markdownlint.png"
19
24
20
25
freeze_trunk " trunk check --filter=cspell test_data.md" " screenshots/cspell_trunk.png"
You can’t perform that action at this time.
0 commit comments