-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathbashly.yml
More file actions
47 lines (39 loc) · 1007 Bytes
/
bashly.yml
File metadata and controls
47 lines (39 loc) · 1007 Bytes
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
name: validate
help: Sample application demonstrating validations
version: 0.1.0
commands:
- name: calc
help: Add two numbers
args:
- name: first
help: First number
required: true
# Specify a validation function.
# Bashly will look for a function named `validate_integer` in your
# script, you can use any name as long as it has a matching function.
validate: integer
- name: second
help: Second number
validate: integer
flags:
- long: --save
arg: path
help: Save the result to a file
# Validations also work on flags (when they have arguments)
validate: file_exists
- name: build
help: Build the project
environment_variables:
- name: build_dir
help: Path to the build directory
default: release
# Validations also work on environment variables
validate: dir_exists
- name: deploy
help: Deploy to production
flags:
- long: --user
help: Username
arg: username
required: true
validate: not_empty