Skip to main content

torii_lib/platforms/radicle/
release.rs

1//! Radicle — release client.
2
3use crate::error::{Result, ToriiError};
4use crate::platforms::release::*;
5
6pub struct RadicleReleaseClient;
7
8impl RadicleReleaseClient {
9    pub fn new() -> Result<Self> {
10        Ok(Self)
11    }
12}
13
14fn radicle_release_unsupported() -> ToriiError {
15    ToriiError::Unsupported(
16        "Radicle has no Release-page object. A release on radicle is \
17         just an annotated git tag (`torii tag create vX --release`); \
18         binaries live outside the network. Mirror to GitLab/GitHub/Codeberg \
19         if you need a hosted release page with notes + assets."
20            .to_string(),
21    )
22}
23
24impl ReleaseClient for RadicleReleaseClient {
25    fn list(&self, _o: &str, _r: &str, _l: usize) -> Result<Vec<Release>> {
26        Err(radicle_release_unsupported())
27    }
28    fn get(&self, _o: &str, _r: &str, _t: &str) -> Result<Release> {
29        Err(radicle_release_unsupported())
30    }
31    fn edit(&self, _o: &str, _r: &str, _t: &str, _n: Option<&str>, _d: Option<&str>) -> Result<()> {
32        Err(radicle_release_unsupported())
33    }
34    fn delete(&self, _o: &str, _r: &str, _t: &str) -> Result<()> {
35        Err(radicle_release_unsupported())
36    }
37}
38
39// ============================================================================
40// Bitbucket Cloud (no Release object)
41// ============================================================================
42//
43// Bitbucket Cloud doesn't have GitHub-style Release entities. It has
44// "Downloads" (binary files attached to a repo, separate from tags)
45// and tags. Most projects use Downloads via the web UI; we expose a
46// clear error so the surface stays honest.