Skip to content

Commit 19d8a95

Browse files
committed
docs: Update documentation on version and update commands
1 parent 08cf7bd commit 19d8a95

4 files changed

Lines changed: 220 additions & 5 deletions

File tree

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,26 @@ If you've ever wanted `npm run` scripts but for Go, Rust, C++, or any other lang
2525

2626
## Installation
2727

28-
### Windows (winget)
28+
### Windows
2929

30+
#### PowerShell (recommended)
31+
```powershell
32+
iwr -useb https://raw.githubusercontent.com/Azuyamat/pace/refs/heads/master/install.ps1 | iex
33+
```
34+
35+
#### Winget
3036
```bash
3137
winget install Azuyamat.Pace
3238
```
3339

34-
### Linux (deb)
40+
### Linux
41+
42+
#### Script (recommended)
43+
```bash
44+
curl -sSL https://raw.githubusercontent.com/Azuyamat/pace/refs/heads/master/install.sh | sh
45+
```
3546

47+
#### .deb Package
3648
Download the `.deb` package from [releases](https://github.com/azuyamat/pace/releases):
3749

3850
```bash

docs/docs/commands/update.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# update
2+
3+
Update pace to the latest version.
4+
5+
## Usage
6+
7+
```bash
8+
pace update
9+
```
10+
11+
## Description
12+
13+
The `update` command automatically updates pace to the latest version available on GitHub. The command intelligently detects your installation method and uses the appropriate update mechanism.
14+
15+
## Installation Method Detection
16+
17+
Pace automatically detects how it was installed and updates accordingly:
18+
19+
### Winget (Windows)
20+
21+
If pace was installed via Winget, the command runs:
22+
23+
```bash
24+
winget upgrade Azuyamat.Pace
25+
```
26+
27+
### Go Install
28+
29+
If pace was installed via `go install`, the command runs:
30+
31+
```bash
32+
go install github.com/azuyamat/pace/cmd/pace@latest
33+
```
34+
35+
### Direct Installation
36+
37+
If pace was installed by downloading the binary directly (via curl, wget, or manual download), the command:
38+
39+
1. Downloads the latest release from GitHub
40+
2. Extracts the binary from the archive
41+
3. Safely replaces the current binary with a backup mechanism
42+
43+
## Examples
44+
45+
### Check and Update
46+
47+
```bash
48+
$ pace update
49+
Checking for updates...
50+
Updating from 1.0.0 to 1.1.0...
51+
Proceeding with self-update...
52+
53+
Successfully updated to version 1.1.0
54+
Restart pace to use the new version
55+
```
56+
57+
### Already Up to Date
58+
59+
```bash
60+
$ pace update
61+
Checking for updates...
62+
Already on latest version: 1.1.0
63+
```
64+
65+
### Winget Installation
66+
67+
```bash
68+
$ pace update
69+
Checking for updates...
70+
Updating from 1.0.0 to 1.1.0...
71+
Running: winget upgrade Azuyamat.Pace
72+
[winget output]
73+
Update completed successfully!
74+
```
75+
76+
### Go Installation
77+
78+
```bash
79+
$ pace update
80+
Checking for updates...
81+
Updating from 1.0.0 to 1.1.0...
82+
Running: go install github.com/azuyamat/pace/cmd/pace@latest
83+
[go install output]
84+
Update completed successfully!
85+
```
86+
87+
## How It Works
88+
89+
1. **Check for Updates**: Queries the GitHub API for the latest release
90+
2. **Compare Versions**: Compares your current version with the latest
91+
3. **Detect Installation Method**: Determines how pace was installed
92+
4. **Execute Update**: Runs the appropriate update mechanism
93+
5. **Verify**: Confirms the update was successful
94+
95+
## Safety Features
96+
97+
For direct installations, the update process includes:
98+
99+
- **Backup Creation**: The old binary is backed up before replacement
100+
- **Rollback on Failure**: If the update fails, the backup is restored
101+
- **Permission Checks**: Verifies write permissions before attempting update
102+
103+
## Platform Support
104+
105+
The update command works on:
106+
107+
- **Windows** (amd64, arm64)
108+
- **Linux** (amd64, arm64)
109+
- **macOS** (amd64, arm64)
110+
111+
## Troubleshooting
112+
113+
### Permission Denied
114+
115+
If you get a permission error:
116+
117+
- **Linux/macOS**: You may need to run with `sudo` if the binary is in a protected directory
118+
- **Windows**: Run your terminal as Administrator if installed in Program Files
119+
120+
### Update Command Not Available
121+
122+
If Winget or Go is detected but the command fails:
123+
124+
- Ensure `winget` or `go` is installed and available in your PATH
125+
- Verify you have an active internet connection
126+
127+
### Manual Update
128+
129+
If the automatic update fails, you can always:
130+
131+
1. Download the latest release from [GitHub Releases](https://github.com/azuyamat/pace/releases)
132+
2. Extract the binary
133+
3. Replace your current pace binary
134+
135+
## See Also
136+
137+
- [version](./version.md) - Check your current version
138+
- [Installation](../installation.md) - Installation methods

docs/docs/commands/version.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# version
2+
3+
Display version information for pace.
4+
5+
## Usage
6+
7+
```bash
8+
pace version
9+
```
10+
11+
## Description
12+
13+
The `version` command displays detailed version information about your pace installation, including:
14+
15+
- Version number
16+
- Git commit hash
17+
- Build date
18+
19+
This is useful for:
20+
- Verifying your installation
21+
- Reporting bugs
22+
- Checking if you need to update
23+
24+
## Example
25+
26+
```bash
27+
$ pace version
28+
pace version 1.0.0
29+
commit: a1b2c3d
30+
built at: 2025-01-15T10:30:00Z
31+
```
32+
33+
## Output
34+
35+
The command displays three lines of information:
36+
37+
1. **Version**: The semantic version number (e.g., 1.0.0)
38+
2. **Commit**: The Git commit hash from which this version was built
39+
3. **Built at**: The timestamp when the binary was compiled
40+
41+
## Development Builds
42+
43+
When running a development build (not installed via release), the version will show as:
44+
45+
```bash
46+
pace version dev
47+
commit: none
48+
built at: unknown
49+
```
50+
51+
## See Also
52+
53+
- [update](./update.md) - Update pace to the latest version
54+
- [Installation](../installation.md) - How to install pace

docs/docs/installation.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@
77

88
## Installation Methods
99

10-
### Windows (winget)
10+
### Windows
1111

12-
The easiest way to install on Windows:
12+
#### PowerShell (recommended)
13+
```powershell
14+
iwr -useb https://raw.githubusercontent.com/Azuyamat/pace/refs/heads/master/install.ps1 | iex
15+
```
16+
17+
#### Winget
1318

1419
```bash
1520
winget install Azuyamat.Pace
1621
```
1722

18-
### Linux (deb)
23+
### Linux
24+
25+
#### Script (recommended)
26+
```bash
27+
curl -sSL https://raw.githubusercontent.com/Azuyamat/pace/refs/heads/master/install.sh | sh
28+
```
1929

30+
#### .deb Package
2031
Download the `.deb` package from [releases](https://github.com/azuyamat/pace/releases):
2132

2233
```bash

0 commit comments

Comments
 (0)