spl:publish
Publish the local UVL model of an SPL to UVLHub and record the resulting DOI in the catalog.
Usage
splent spl:publish <spl_name> [--dry-run]
Options
| Option | Description |
|---|---|
--dry-run |
Show what would be done without touching the network or metadata.toml. |
Description
Closes the UVL → UVLHub → spl:fetch cycle. The .uvl files are not tracked in git — UVLHub is the remote source of truth — so after editing a model locally this command uploads it and updates splent_catalog/{spl}/metadata.toml to point at the published version:
- Empty
doiinmetadata.toml→ uploads a new dataset (title and description come frommetadata.toml) and publishes it, minting a DOI. - Existing
doi→ resolves the dataset by DOI and publishes a new version of it.
After publishing, the raw file on UVLHub is downloaded (following redirects) and compared byte-for-byte with the local UVL. Only if they match are doi and file written to metadata.toml — the file value is the real filename reported by the server, which may differ from the local name. On any failure (invalid UVL, server error, divergent content) the command exits with an error and metadata.toml is left untouched.
Authentication
The command needs an UVLHub API key:
export UVLHUB_API_KEY=<your-key>
Generate one at https://www.uvlhub.io/developer/api-keys. A different UVLHub instance can be targeted with the UVLHUB_URL environment variable (default: https://www.uvlhub.io).
Example
splent spl:publish cms_spl
Publishing cms_spl to https://www.uvlhub.io
No DOI in metadata.toml — uploading a new dataset...
📤 Draft dataset created (id 42) — publishing...
🌐 Published as DOI 10.5281/zenodo.12345 (file: cms_spl.uvl)
Verifying published content against the local UVL...
✅ 'cms_spl' published to UVLHub (DOI 10.5281/zenodo.12345).