Skip to content

Commit 8ad388e

Browse files
author
Luca Bianconi
committed
chore: refined workflows
1 parent 15a26dd commit 8ad388e

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.github/workflows/release-go-task.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,10 @@ jobs:
254254
run: task protoc:collect
255255

256256
- name: Add configuration JSON schema
257-
run: |
258-
TAG=${{ needs.create-release-artifacts.outputs.version }}
259-
cp ./configuration/configuration.schema.json ${{ env.DIST_DIR}}/${TAG}-configuration.schema.json
257+
run: task dist:jsonschema
260258

261259
- name: Create checksum file
262-
working-directory: ${{ env.DIST_DIR}}
260+
working-directory: ${{ env.DIST_DIR }}
263261
run: |
264262
TAG=${{ needs.create-release-artifacts.outputs.version }}
265263
sha256sum ${{ env.PROJECT_NAME }}_${TAG}* > ${TAG}-checksums.txt

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ venv
2828
/docsgen/arduino-cli.exe
2929
/docs/rpc/*.md
3030
/docs/commands/*.md
31+
/docs/configuration.schema.json

Taskfile.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tasks:
99
deps:
1010
- task: go:cli-docs
1111
- task: protoc:docs
12+
- task: docs:include-configuration-json-schema
1213
cmds:
1314
- task: general:format-prettier
1415

@@ -218,6 +219,11 @@ tasks:
218219
- '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,settings.md --proto_path=rpc ./rpc/cc/arduino/cli/settings/v1/*.proto'
219220
- '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,debug.md --proto_path=rpc ./rpc/cc/arduino/cli/debug/v1/*.proto'
220221

222+
docs:include-configuration-json-schema:
223+
desc: Copy configuration JSON schema to make it available in documentation
224+
cmds:
225+
- cp ./configuration/configuration.schema.json ./docs/configuration.schema.json
226+
221227
protoc:check:
222228
desc: Perform linting of the protobuf definitions
223229
cmds:

docs/configuration.md

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ The configuration file must be named `arduino-cli`, with the appropriate file ex
105105
- envfile
106106
- [INI]
107107

108+
The configuration file [JSON schema][configuration-schema] can be used to independently validate the file content. This
109+
schema should be considered unstable in this version.
110+
108111
#### Locations
109112

110113
Configuration files in the following locations are recognized by Arduino CLI:
@@ -158,3 +161,4 @@ additional_urls = [ "https://downloads.arduino.cc/packages/package_staging_index
158161
[java properties file]: https://en.wikipedia.org/wiki/.properties
159162
[hcl]: https://github.com/hashicorp/hcl
160163
[ini]: https://en.wikipedia.org/wiki/INI_file
164+
[configuration-schema]: ./configuration.schema.json

0 commit comments

Comments
 (0)