@@ -14,8 +14,6 @@ $ bashly generate
1414$ bashly generate
1515```
1616
17- <!-- include: src/verify_command.sh -->
18-
1917-----
2018
2119## ` bashly.yml `
@@ -46,25 +44,19 @@ commands:
4644
4745 # Using the `default: value` option will cause the value to variable to be
4846 # set if it is not provided by the user.
47+ - name : region
48+ help : Cloud region
49+ default : us-east-2
50+
51+ # Using the `allowed: [value1, value2]` option will halt the script's
52+ # execution with a friendly error message, unless the variable matches one
53+ # of the defined values.
4954 - name : environment
5055 help : One of development, production or test
56+ allowed : [development, production, testing]
5157 default : development
5258` ` ` `
5359
54- # # `src/verify_command.sh`
55-
56- ` ` ` ` bash
57- echo "# this file is located in 'src/verify_command.sh'"
58- echo "# code for 'cli verify' goes here"
59- echo "# you can edit it freely and regenerate (it will not be overwritten)"
60- inspect_args
61-
62- echo "environment:"
63- echo "- API_KEY=${API_KEY:-}"
64- echo "- ENVIRONMENT=${ENVIRONMENT:-}"
65- echo "- MY_SECRET=${MY_SECRET:-}"
66-
67- ````
6860
6961
7062# # Output
@@ -133,8 +125,13 @@ Environment Variables:
133125 MY_SECRET (required)
134126 Your secret
135127
128+ REGION
129+ Cloud region
130+ Default : us-east-2
131+
136132 ENVIRONMENT
137133 One of development, production or test
134+ Allowed : development, production, testing
138135 Default : development
139136
140137
@@ -156,10 +153,12 @@ missing required environment variable: MY_SECRET
156153# code for 'cli verify' goes here
157154# you can edit it freely and regenerate (it will not be overwritten)
158155args: none
159- environment:
160- - API_KEY=
161- - ENVIRONMENT=development
162- - MY_SECRET=there is no spoon
156+
157+ environment variables:
158+ - $API_KEY =
159+ - $ENVIRONMENT = development
160+ - $MY_SECRET = there is no spoon
161+ - $REGION = us-east-2
163162
164163
165164````
@@ -171,10 +170,12 @@ environment:
171170# code for 'cli verify' goes here
172171# you can edit it freely and regenerate (it will not be overwritten)
173172args: none
174- environment:
175- - API_KEY=
176- - ENVIRONMENT=production
177- - MY_SECRET=safe-with-me
173+
174+ environment variables:
175+ - $API_KEY =
176+ - $ENVIRONMENT = production
177+ - $MY_SECRET = safe-with-me
178+ - $REGION = us-east-2
178179
179180
180181````
0 commit comments