Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Add a no announce test for default behaviour
◌ CI pending Adrian Duke committed 2 months ago
commit cf8f86a300745a800fa3ba44cbede6d7a7d4ab24
parent 4669ddf43f28b4dd622089255eeb5cb0baa6826b
1 pending (1 total) View logs
2 files changed +52 -0
added crates/radicle-cli/examples/rad-init-no-announce.md
@@ -0,0 +1,47 @@
+
To create your first radicle repository, navigate to a git repository, and run the
+
`init` command. Make sure you have [authenticated](../rad-auth.md) beforehand.
+

+
```
+
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public -v
+

+
Initializing public radicle 👾 repository in [..]
+

+
✓ Repository heartwood created.
+
{
+
  "name": "heartwood",
+
  "description": "Radicle Heartwood Protocol & Stack",
+
  "defaultBranch": "master"
+
}
+

+
Your Repository ID (RID) is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji.
+
You can show it any time by running `rad .` from this directory.
+

+
Your repository has not been announced to the network, run `rad sync --announce` when you're ready.
+

+
To push changes, run `git push`.
+
```
+

+
If we try to initialize it again, we get an error:
+

+
```(fail)
+
$ rad init
+
✗ Error: repository is already initialized with remote rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
+
```
+

+
Repositories can be listed with the `ls` command:
+

+
```
+
$ rad ls
+
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
+
│ Name        RID                                 Visibility   Head      Description                        │
+
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
+
│ heartwood   rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji   public       f2de534   Radicle Heartwood Protocol & Stack │
+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
```
+

+
Public repositories are added to our inventory:
+

+
```
+
$ rad node inventory
+
rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
+
```
modified crates/radicle-cli/tests/commands.rs
@@ -228,6 +228,11 @@ fn rad_init() {
}

#[test]
+
fn rad_init_no_announce() {
+
    Environment::alice(["rad-init-no-announce"]);
+
}
+

+
#[test]
fn rad_init_bare() {
    let mut env = Environment::new();
    let alice = env.profile("alice");