Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add apps field for globbing for applications #31

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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