File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,7 @@ consider using [lib functions](https://bashly.dev/usage/writing-your-scripts/#ad
2424instead. lib functions can help create a more robust and maintainable codebase
2525by centralizing reusable logic.
2626
27- <!-- include: src/build_command.sh -->
28- <!-- include: src/test_command.sh -->
29- <!-- include: src/deploy_command.sh -->
27+ <!-- include: src/build_command.sh src/test_command.sh src/deploy_command.sh -->
3028
3129-----
3230
@@ -69,6 +67,33 @@ inspect_args
6967echo
7068````
7169
70+ ## ` src/test_command.sh `
71+
72+ ```` bash
73+ echo " TEST complete"
74+ inspect_args
75+ echo
76+ ````
77+
78+ ## ` src/deploy_command.sh `
79+
80+ ```` bash
81+ # We must record the `args` array to our local variables, due to the fact
82+ # that calling `run` will reset it.
83+ build=${args['--build']}
84+ test=${args['--test']}
85+
86+ # Call other commands in the same way they would be called in the CLI.
87+ [[ $build ]] && run build production
88+ [[ $test ]] && run test --full
89+
90+ # Perform the purpose of this command.
91+ echo " DEPLOY complete"
92+ inspect_args
93+
94+
95+ ````
96+
7297
7398## Output
7499
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ ISSUE TRACKER
102102AUTHORS
103103 Lana Lang.
104104
105- Version 0.1.0 May 2025 download(1)
105+ Version 0.1.0 July 2025 download(1)
106106
107107
108108````
You can’t perform that action at this time.
0 commit comments