-
Notifications
You must be signed in to change notification settings - Fork 5
/
op.conf
55 lines (37 loc) · 1.35 KB
/
op.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
## Script Generation
generate: bashly generate --env production && op man
#? Generate the script and manpage
watch: filewatcher --immediate "src/**/*.*" "bashly generate"
#? Watch src/* and regenerate olf on change
## Testing and Linting
test:
docker compose build bash
docker compose run --rm test
[[ -z "$TEST" ]] && docker compose run --rm test_zsh
#? Run test suite inside a docker container
#? If a specific TEST is requested, zsh tests will not be executed
#? Usage: op test
#? TEST=info op test
shellcheck: shellcheck alf setup uninstall && green "PASS"
#? Run shellcheck
shfmt: shfmt -ci -i 2 -d alf setup uninstall && green "PASS"
#? Run shfmt tests
## Development
zsh: docker compose run --rm zsh
#? start ZSH container
man: bashly render :mandoc doc && op man5
#? Render the man pages
## Release
changelog: git changelog --save
#? Generate changelog
version:
[[ -n "$1" ]] || abort "Usage: op version NEW_VERSION"
sed -i "s/$(alf --version)/$1/g" README.md src/bashly.yml test/fixtures/empty-dir/approvals/alf_version test/fixtures/empty-dir/approvals/alf_upgrade
op generate
git commit -am "version bump $1"
git tag v$1
#? Update version, regenerate and tag
#? Usage: op version NEW_VERSION
private
man5: pandoc -f markdown-smart -s --to man "doc/alf.conf.md" > "doc/alf.conf.5"
#? Generate the man5 (file format) documentation