This commit is contained in:
2021-09-29 08:55:11 -03:00
parent 85e464c559
commit 481ebc30e0
15 changed files with 856 additions and 5 deletions
+22
View File
@@ -0,0 +1,22 @@
# SAMPLE mk file
default: main
env:
tasks:
deploy:
pre: [ build,test ]
help: Deploys the project
cmd: echo deploying
test:
pre: [ c ]
help: Tests project
cmd: echo testing
build:
help: Build binaries
cmd: echo building
main:
help: Main task
pre: [ build ]
cmd: |-
echo main
echo done
+89
View File
@@ -0,0 +1,89 @@
{
"$id": "https://www.digitalticircle.com.br/_schemas/mk.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Digital Circle - Make Instructions",
"type": "object",
"additionalProperties": false,
"$d": {
"task": {
"type": "object",
"properties": {
"pre": {
"description": "Predecessor tasks",
"type": "array",
"items": {
"type": "string"
}
},
"cmd": {
"description": "Command this task should run",
"type": "string"
},
"help": {
"description": "Help for this task",
"type": "string"
},
"onerror": {
"description": "What to do in case of error"
},
"env": {
"type": "object",
"description": "Global Env Var",
"patternProperties": {
".{1.}": {
"type": "string"
}
}
},
"vars": {
"type": "object",
"description": "Global Text Var",
"patternProperties": {
".{1.}": {
"type": "string"
}
}
}
},
"additionalProperties": "false"
}
},
"properties": {
"default": {
"type": "string",
"default": "main",
"description": "Default task to run"
},
"tasks": {
"type": "object",
"patternProperties": {
".{1,}": {
"allOf": [
{
"$ref": "#/$d/task"
}
]
}
},
"description": "Tasks configured for execution"
},
"env": {
"type": "object",
"description": "Global Env Var",
"patternProperties": {
".{1.}": {
"type": "string"
}
}
},
"vars": {
"type": "object",
"description": "Global Text Var",
"patternProperties": {
".{1.}": {
"type": "string"
}
}
}
}
}