Skip to content

Commit 6f5d3ee

Browse files
committed
Use variable for Dojo version
1 parent a09c356 commit 6f5d3ee

3 files changed

Lines changed: 32 additions & 59 deletions

File tree

src/const.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const DOJO_VERSION = "1.28.2";

src/content/docs/install/download-and-verify.mdx

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: Download and verify Dojo
33
---
44

5-
import { Steps } from '@astrojs/starlight/components';
5+
import { Steps, Code } from '@astrojs/starlight/components';
6+
import { DOJO_VERSION } from "../../../const";
67

78
Continue copying and pasting the following commands in the terminal, then press `ENTER`.
89

@@ -14,24 +15,19 @@ Continue copying and pasting the following commands in the terminal, then press
1415
```
1516

1617
2. Download the latest version of Dojo from GitHub over Tor
17-
```sh
18-
torsocks wget -O samourai-dojo-1.27.0.zip https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v1.27.0.zip
19-
```
18+
<Code code={`torsocks wget -O samourai-dojo-${DOJO_VERSION}.zip https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v${DOJO_VERSION}.zip`} lang="sh" />
2019

2120
3. Download the Dojo fingerprints file and PGP signature file from GitHub over Tor
22-
```sh
23-
torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.27.0/samourai-dojo-1.27.0-fingerprints.txt && torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.27.0/samourai-dojo-1.27.0-fingerprints.txt.sig
24-
```
21+
<Code code={`torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v${DOJO_VERSION}/samourai-dojo-${DOJO_VERSION}-fingerprints.txt && torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v${DOJO_VERSION}/samourai-dojo-${DOJO_VERSION}-fingerprints.txt.sig`} lang="sh" />
22+
2523
</Steps>
2624

2725
## Verify PGP signature
2826

2927

3028
Verify the PGP signed fingerprints file:
3129

32-
```sh
33-
gpg --verify samourai-dojo-1.27.0-fingerprints.txt.sig
34-
```
30+
<Code code={`gpg --verify samourai-dojo-${DOJO_VERSION}-fingerprints.txt.sig`} lang="sh" />
3531

3632

3733
### ✅ Successful result
@@ -56,26 +52,23 @@ If you observe a different result to the above, **stop immediately**. Do not con
5652
## Verify SHA256 fingerprints
5753

5854
Verify the SHA256 fingerprints of the downloaded file:
59-
```sh
60-
sha256sum --check samourai-dojo-1.27.0-fingerprints.txt --ignore-missing
61-
```
55+
56+
<Code code={`sha256sum --check samourai-dojo-${DOJO_VERSION}-fingerprints.txt --ignore-missing`} lang="sh" />
6257

6358
### ✅ Successful result
6459
Successful verification is confirmed if the following is displayed on screen:
6560

66-
```
67-
samourai-dojo-1.27.0.zip: OK
68-
```
61+
<Code code={`samourai-dojo-${DOJO_VERSION}.zip: OK`} />
6962

7063
### ❌ Unsuccessful result
7164

7265
Unsuccessful verification might be displayed on screen:
7366

74-
```
75-
samourai-dojo-1.27.0.zip: FAILED
67+
<Code code={`
68+
samourai-dojo-${DOJO_VERSION}.zip: FAILED
7669
sha256sum: WARNING: 1 computed checksum did NOT match
77-
sha256sum: samourai-dojo-1.27.0-fingerprints.txt: no file was verified
78-
```
70+
sha256sum: samourai-dojo-${DOJO_VERSION}-fingerprints.txt: no file was verified
71+
`} />
7972

8073
If the hashes do not match, **stop immediately**. Do not continue following this guide. Do not install Dojo. Seek advice from a community member.
8174

@@ -85,23 +78,17 @@ Continue copying and pasting the following commands in the terminal, then press
8578

8679
<Steps>
8780
1. Unzip the downloaded file
88-
```sh
89-
unzip samourai-dojo-1.27.0.zip -d .
90-
```
81+
<Code code={`unzip samourai-dojo-${DOJO_VERSION}.zip -d .`} lang="sh" />
9182

9283
2. Create a directory for your Wallet Server called "dojo-app"
9384
```sh
9485
mkdir ~/dojo-app
9586
```
9687

9788
3. Move the unzipped files to the new "dojo-app" directory
98-
```sh
99-
mv ~/samourai-dojo-1.27.0/* ~/dojo-app/
100-
```
89+
<Code code={`mv ~/samourai-dojo-${DOJO_VERSION}/* ~/dojo-app/`} lang="sh" />
10190

10291
4. Remove the files which are no longer required
103-
```sh
104-
rm -r samourai-dojo-1.27.0 && rm samourai-dojo-1.27.0.zip && rm samourai-dojo-1.27.0-fingerprints.txt && rm samourai-dojo-1.27.0-fingerprints.txt.sig && rm E53AD419B242822F19E23C6D3033D463D6E544F6
105-
```
92+
<Code code={`rm -r samourai-dojo-${DOJO_VERSION} && rm samourai-dojo-${DOJO_VERSION}.zip && rm samourai-dojo-${DOJO_VERSION}-fingerprints.txt && rm samourai-dojo-${DOJO_VERSION}-fingerprints.txt.sig && rm E53AD419B242822F19E23C6D3033D463D6E544F6`} lang="sh" />
10693
</Steps>
10794

src/content/docs/usage/updating-dojo.mdx

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
title: Updating Dojo
33
---
44

5-
import { Steps } from '@astrojs/starlight/components';
5+
import { Steps, Code } from '@astrojs/starlight/components';
66
import ImageZoom from 'starlight-image-zoom/components/ImageZoom.astro'
7+
import { DOJO_VERSION } from "../../../const";
78

89
<ImageZoom />
910

@@ -13,7 +14,7 @@ If you are unsure what Dojo version you are on, login to your DMT and displayed
1314

1415
___
1516

16-
**The following guide will update you to the latest Dojo version**: `v1.27.0`
17+
**The following guide will update you to the latest Dojo version**: <code>{DOJO_VERSION}</code>
1718

1819
All commands are to be copy and pasted into the terminal of your Dojo, then press `ENTER`.
1920

@@ -66,19 +67,13 @@ After your system has rebooted, log back in using your Dojo user credentials the
6667
cd ~/
6768
```
6869
5. Download over Tor the latest version of Dojo from GitHub
69-
```sh
70-
torsocks wget -O samourai-dojo-1.27.0.zip https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v1.27.0.zip
71-
```
70+
<Code code={`torsocks wget -O samourai-dojo-${DOJO_VERSION}.zip https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v${DOJO_VERSION}.zip`} lang="sh" />
7271
6. Download over Tor the Dojo fingerprints file and PGP signed fingerprints file from GitHub
73-
```sh
74-
torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.27.0/samourai-dojo-1.27.0-fingerprints.txt && torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.27.0/samourai-dojo-1.27.0-fingerprints.txt.sig
75-
```
72+
<Code code={`torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v${DOJO_VERSION}/samourai-dojo-${DOJO_VERSION}-fingerprints.txt && torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v${DOJO_VERSION}/samourai-dojo-${DOJO_VERSION}-fingerprints.txt.sig`} lang="sh" />
7673
</Steps>
7774

7875
### Verify the PGP signed fingerprints file:
79-
```sh
80-
gpg --verify samourai-dojo-1.27.0-fingerprints.txt.sig
81-
```
76+
<Code code={`gpg --verify samourai-dojo-${DOJO_VERSION}-fingerprints.txt.sig`} lang="sh" />
8277

8378
### ✅ Successful result:
8479
Successful verification is confirmed if the following is displayed on screen:
@@ -99,44 +94,34 @@ If you observe a different result to the above, **stop immediately**. Do not con
9994
## Verify SHA256 fingerprints
10095

10196
Verify the SHA256 fingerprints of the downloaded file:
102-
```sh
103-
sha256sum --check samourai-dojo-1.27.0-fingerprints.txt --ignore-missing
104-
```
97+
<Code code={`sha256sum --check samourai-dojo-${DOJO_VERSION}-fingerprints.txt --ignore-missing`} lang="sh" />
10598

10699
### ✅ Successful result
107100
Successful verification is confirmed if the following is displayed on screen:
108101

109-
```
110-
samourai-dojo-1.27.0.zip: OK
111-
```
102+
<Code code={`samourai-dojo-${DOJO_VERSION}.zip: OK`} />
112103

113104
### ❌ Unsuccessful result
114105

115106
Unsuccessful verification might be displayed on screen:
116107

117-
```
118-
samourai-dojo-1.27.0.zip: FAILED
108+
<Code code={`
109+
samourai-dojo-${DOJO_VERSION}.zip: FAILED
119110
sha256sum: WARNING: 1 computed checksum did NOT match
120-
sha256sum: samourai-dojo-1.27.0-fingerprints.txt: no file was verified
121-
```
111+
sha256sum: samourai-dojo-${DOJO_VERSION}-fingerprints.txt: no file was verified
112+
`} />
122113

123114
If the hashes do not match, **stop immediately**. Do not continue following this guide. Do not install Dojo. Seek advice from a community member.
124115

125116
## Unpack files and upgrade Dojo
126117

127118
<Steps>
128119
1. Unzip the downloaded file
129-
```sh
130-
unzip samourai-dojo-1.27.0.zip -d .
131-
```
120+
<Code code={`unzip samourai-dojo-${DOJO_VERSION}.zip -d .`} lang="sh" />
132121
2. Copy the file contents into the Dojo directory
133-
```sh
134-
cp -a samourai-dojo-1.27.0/. dojo-app/
135-
```
122+
<Code code={`cp -a samourai-dojo-${DOJO_VERSION}/. dojo-app/`} lang="sh" />
136123
3. Remove the files which are no longer required
137-
```sh
138-
rm -r samourai-dojo-1.27.0 && rm samourai-dojo-1.27.0.zip && rm samourai-dojo-1.27.0-fingerprints.txt && rm samourai-dojo-1.27.0-fingerprints.txt.sig && rm E53AD419B242822F19E23C6D3033D463D6E544F6
139-
```
124+
<Code code={`rm -r samourai-dojo-${DOJO_VERSION} && rm samourai-dojo-${DOJO_VERSION}.zip && rm samourai-dojo-${DOJO_VERSION}-fingerprints.txt && rm samourai-dojo-${DOJO_VERSION}-fingerprints.txt.sig && rm E53AD419B242822F19E23C6D3033D463D6E544F6`} lang="sh" />
140125
4. Navigate to the Dojo script directory
141126
```sh
142127
cd ~/dojo-app/docker/my-dojo

0 commit comments

Comments
 (0)