diff --git a/index/golioth.json b/index/golioth.json index d408ebb..a47aed6 100644 --- a/index/golioth.json +++ b/index/golioth.json @@ -14,6 +14,7 @@ "title": "CAN / OBD-II Asset Tracker Reference Design", "description": "This Reference Design requires external hardware on top of an nRF9160-DK (see [https://projects.golioth.io/reference-designs/can-asset-tracker/guide-nrf9160-dk/](https://projects.golioth.io/reference-designs/can-asset-tracker/guide-nrf9160-dk/), but includes all code required to pass messages received on a CAN bus back to the Cloud, as well as regular GPS readings. Over-the-air updates are built in.", "kind": "template", + "license": "Apache 2.0", "tags": ["dfu","lte"] }, { @@ -21,6 +22,7 @@ "title": "Air Quality Monitor Reference Design", "description": "This Reference Design requires external hardware on top of an nRF9160-DK (see [https://projects.golioth.io/reference-designs/air-quality-monitor/guide-nrf9160-dk](https://projects.golioth.io/reference-designs/air-quality-monitor/guide-nrf9160-dk/), but includes all code required to monitor readings from connected air quality sensors and pass back to the Cloud. Includes remote procedure call to clean sensor, and Over-the-air updates are built in.", "kind": "template", + "license": "Apache 2.0", "tags": ["dfu","lte"] } ] diff --git a/resources/schema.json b/resources/schema.json index a6b4f3a..d8ee0fb 100644 --- a/resources/schema.json +++ b/resources/schema.json @@ -63,6 +63,10 @@ ] }, "description": "An array of tags describing the application." + }, + "license": { + "type": "string", + "description": "The name of the application license, e.g. \"Apache 2.0\". Inferred from the repo if missing." } }, "additionalProperties": false, diff --git a/scripts/generate-index-json.ts b/scripts/generate-index-json.ts index 9097e4f..47feb80 100644 --- a/scripts/generate-index-json.ts +++ b/scripts/generate-index-json.ts @@ -137,7 +137,7 @@ async function fetchRepoData( isTemplate: repoData.is_template ?? false, kind: app.kind, lastUpdate: repoData.updated_at, - license: repoData.license?.spdx_id ?? undefined, + license: app.license ?? repoData.license?.name ?? undefined, watchers: repoData.watchers_count, releases: releases.data.map((release) => ({ date: release.created_at, diff --git a/site/src/app/AppBlock.tsx b/site/src/app/AppBlock.tsx index f50de28..4c15c81 100644 --- a/site/src/app/AppBlock.tsx +++ b/site/src/app/AppBlock.tsx @@ -12,6 +12,7 @@ import { CommandLineIcon, ArrowTopRightOnSquareIcon, CheckBadgeIcon, + ScaleIcon, } from '@heroicons/react/20/solid'; import { NormalisedApp } from '../schema'; @@ -82,7 +83,9 @@ function AppBlock({ app, setShowingAppId }: Props): JSX.Element { - {app.description} + + {app.description} +
@@ -94,10 +97,18 @@ function AppBlock({ app, setShowingAppId }: Props): JSX.Element { Instructions
- -

- Last updated {formatRelative(new Date(app.lastUpdate), new Date())} -

+
+ + {app.license && ( + <> + {app.license} + + )} + + + Last updated {formatRelative(new Date(app.lastUpdate), new Date())} + +
); } diff --git a/site/src/schema.ts b/site/src/schema.ts index 88662b5..c4a03ba 100644 --- a/site/src/schema.ts +++ b/site/src/schema.ts @@ -80,6 +80,11 @@ export const appMetadataSchema = { items: appTagSchema, description: 'An array of tags describing the application.', }, + license: { + type: 'string', + description: + 'The name of the application license, e.g. "Apache 2.0". Inferred from the repo if missing.', + }, }, additionalProperties: false, required: ['name', 'kind', 'tags'],