Skip to content

Commit

Permalink
Add apps field for globbing for applications (#31)
Browse files Browse the repository at this point in the history
* Add apps field for globbing for applications

This field will be used by VS Code to add `application` entries in the
workspace settings when cloning the repo, allowing users to see all
available applications for the start.

* Add app globs for relevant repositories
  • Loading branch information
trond-snekvik authored Nov 24, 2023
1 parent 74f9dd4 commit 060f0ae
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index/circuitdojo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"title": "nRF9160 Feather Examples and Drivers",
"description": "Zephyr examples and drivers for the [nRF9160 Feather](https://docs.circuitdojo.com/nrf9160-getting-started.html)",
"kind": "sample",
"tags": ["lte"]
"tags": ["lte"],
"apps": "samples/*"
}
]
}
3 changes: 2 additions & 1 deletion index/nrfconnect.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"title": "nRF Connect SDK example application",
"description": "Official reference implementation for various out-of-tree concepts, like boards, drivers and a CI setup.",
"kind": "template",
"tags": []
"tags": [],
"apps": "app"
}
]
}
3 changes: 2 additions & 1 deletion index/onomondo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"name": "nrf-softsim",
"description": "Manifest repo for integrating SoftSIM and nrf-sdk",
"kind": "sample",
"tags": ["lte"]
"tags": ["lte"],
"apps": "samples/*"
}
]
}
3 changes: 3 additions & 0 deletions resources/output_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@
"lastUpdate": {
"type": "string",
"format": "date-time"
},
"apps": {
"type": "string"
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions resources/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"license": {
"type": "string",
"description": "The name of the application license, e.g. \"Apache 2.0\". Inferred from the repo if missing."
},
"apps": {
"type": "string",
"description": "Glob pattern to find directories containing applications.\n\nApplications need a *.conf file and a CMakeLists.txt file at their root. The glob expressions are used to match directories, so no file pattern is necessary.\n\nBy default, the VS Code extension will assume that there's just a single application sitting at the root of the repo."
}
},
"additionalProperties": false,
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-index-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ async function fetchRepoData(
watchers: repoData.watchers_count,
stars: repoData.stargazers_count,
forks: repoData.forks_count,
apps: app.apps,
releases: releases.data.map((release) => ({
date: release.created_at,
name: release.name ?? release.tag_name,
Expand Down
9 changes: 9 additions & 0 deletions site/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ export const appMetadataSchema = {
description:
'The name of the application license, e.g. "Apache 2.0". Inferred from the repo if missing.',
},
apps: {
type: 'string',
description: [
'Glob pattern to find directories containing applications.',
'Applications need a *.conf file and a CMakeLists.txt file at their root. The glob expressions are used to match directories, so no file pattern is necessary.',
"By default, the VS Code extension will assume that there's just a single application sitting at the root of the repo.",
].join('\n\n'),
},
},
additionalProperties: false,
required: ['name', 'kind', 'tags'],
Expand Down Expand Up @@ -173,6 +181,7 @@ export const appSchema = {
forks: { type: 'integer' },
defaultBranch: { type: 'string' },
lastUpdate: { type: 'string', format: 'date-time' },
apps: { type: 'string' },
},
required: [
'id',
Expand Down

0 comments on commit 060f0ae

Please sign in to comment.