Skip to content

Commit c0e0b8a

Browse files
committed
Release v0.1.14
1 parent 394214d commit c0e0b8a

File tree

8 files changed

+659
-13
lines changed

8 files changed

+659
-13
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.14] - 2025-11-03
9+
10+
### Added
11+
12+
- **Uninstall scripts** - Cross-platform uninstall scripts for Linux, macOS, and Windows
13+
- **Uninstall target in Makefile** - `make uninstall` command to show uninstall instructions
14+
- **Uninstall documentation** - Added uninstall section to README with usage instructions
15+
16+
### Changed
17+
18+
- **Debug logs enabled by default** - Changed default value of debug_logs_enabled to true in config.toml
19+
20+
---
21+
822
## [0.1.13] - 2025-10-30
923

1024
### Added

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ratifact"
3-
version = "0.1.13"
3+
version = "0.1.14"
44
edition = "2024"
55

66
[dependencies]

Makefile

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile for Ratifact by Neura
22

3-
.PHONY: build run clean test check release help
3+
.PHONY: build run clean test check release help uninstall
44

55
# Build the project
66
build:
@@ -57,16 +57,39 @@ clippy:
5757
# Run all checks
5858
all: check test
5959

60+
# Uninstall the application
61+
uninstall:
62+
@echo "Starting uninstallation process..."
63+
@echo "Please run the appropriate script for your OS:"
64+
@echo ""
65+
@echo "Linux:"
66+
@echo " bash src/scripts/linux/uninstall.sh"
67+
@echo ""
68+
@echo "macOS:"
69+
@echo " bash src/scripts/macos/uninstall.sh"
70+
@echo ""
71+
@echo "Windows (PowerShell as Administrator):"
72+
@echo " powershell -ExecutionPolicy Bypass -File src/scripts/windows/uninstall.ps1"
73+
@echo ""
74+
@echo "Or from remote:"
75+
@echo ""
76+
@echo "Linux/macOS:"
77+
@echo " curl -fsSL https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/linux/uninstall.sh | bash"
78+
@echo ""
79+
@echo "Windows (PowerShell as Administrator):"
80+
@echo " powershell -Command \"iwr -useb https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/windows/uninstall.ps1 | iex\""
81+
6082
# Show help
6183
help:
6284
@echo "Available targets:"
63-
@echo " build - Build the project"
64-
@echo " run - Build and run the project"
65-
@echo " test - Run tests"
66-
@echo " check - Check code without building"
67-
@echo " release - Build release version"
68-
@echo " clean - Clean build artifacts"
69-
@echo " fmt - Format code"
70-
@echo " clippy - Lint code"
71-
@echo " all - Run check and test"
72-
@echo " help - Show this help"
85+
@echo " build - Build the project"
86+
@echo " run - Build and run the project"
87+
@echo " test - Run tests"
88+
@echo " check - Check code without building"
89+
@echo " release - Build release version"
90+
@echo " clean - Clean build artifacts"
91+
@echo " fmt - Format code"
92+
@echo " clippy - Lint code"
93+
@echo " all - Run check and test"
94+
@echo " uninstall - Show uninstall instructions"
95+
@echo " help - Show this help"

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This TUI app runs in your terminal and helps you monitor build processes, track
2121
- [How to Use It](#how-to-use-it)
2222
- [What You Need](#what-you-need)
2323
- [Special Notes](#special-notes)
24+
- [Uninstall](#uninstall)
2425
- [Contributing](#contributing)
2526
- [License](#license)
2627

@@ -122,6 +123,71 @@ Use Enter in the settings panel to edit these options via popups.
122123

123124
**Permissions**: Ensure read/write access to project directories and PostgreSQL access.
124125

126+
## Uninstall
127+
128+
To uninstall Ratifact and remove all associated components, use the uninstall scripts:
129+
130+
### Linux
131+
132+
```bash
133+
curl -fsSL https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/linux/uninstall.sh | bash
134+
```
135+
136+
Or locally:
137+
138+
```bash
139+
bash src/scripts/linux/uninstall.sh
140+
```
141+
142+
Or using Make:
143+
144+
```bash
145+
make uninstall
146+
```
147+
148+
### macOS
149+
150+
```bash
151+
curl -fsSL https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/macos/uninstall.sh | bash
152+
```
153+
154+
Or locally:
155+
156+
```bash
157+
bash src/scripts/macos/uninstall.sh
158+
```
159+
160+
Or using Make:
161+
162+
```bash
163+
make uninstall
164+
```
165+
166+
### Windows
167+
168+
Open PowerShell as Administrator and run:
169+
170+
```powershell
171+
powershell -Command "iwr -useb https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/windows/uninstall.ps1 | iex"
172+
```
173+
174+
Or locally:
175+
176+
```powershell
177+
powershell -ExecutionPolicy Bypass -File src/scripts/windows/uninstall.ps1
178+
```
179+
180+
### What the Uninstall Script Does
181+
182+
The uninstall process will:
183+
184+
1. **Stop PostgreSQL container** - Shuts down the running Docker container
185+
2. **Remove database volume** (optional) - You'll be prompted to confirm deletion of all database data
186+
3. **Clean build artifacts** - Removes compiled binaries and intermediate build files
187+
4. **Remove installation directory** (optional) - You can choose to keep the source code or remove it completely
188+
189+
The script logs all actions to a file (e.g., `/tmp/ratifact-uninstall-*.log`) for reference.
190+
125191
## Contributing
126192

127193
Found a bug or want to add something? Check [CONTRIBUTING.md](CONTRIBUTING.md).

src/config/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database_url = ""
22
scan_paths = ["/srv"]
33
retention_days = 30
4-
debug_logs_enabled = false
4+
debug_logs_enabled = true
55
excluded_paths = []

src/scripts/linux/uninstall.sh

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
#!/bin/bash
2+
# Ratifact Uninstallation Script for Linux
3+
# Removes Ratifact application, Docker container, and PostgreSQL volume
4+
5+
set -e
6+
7+
# Color codes
8+
RED='\033[0;31m'
9+
GREEN='\033[0;32m'
10+
YELLOW='\033[1;33m'
11+
CYAN='\033[0;36m'
12+
NC='\033[0m' # No Color
13+
14+
# Logging setup
15+
LOG_FILE="/tmp/ratifact-uninstall-$(date +%Y%m%d_%H%M%S).log"
16+
exec > >(tee -a "$LOG_FILE")
17+
exec 2>&1
18+
19+
echo "Uninstall log: $LOG_FILE"
20+
21+
# Helper functions
22+
print_header() {
23+
echo ""
24+
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════╗${NC}"
25+
echo -e "${CYAN}║ Ratifact Uninstallation Script - Linux ║${NC}"
26+
echo -e "${CYAN}╚═══════════════════════════════════════════════════════════╝${NC}"
27+
echo ""
28+
}
29+
30+
print_success() {
31+
echo -e "${GREEN}$1${NC}"
32+
}
33+
34+
print_error() {
35+
echo -e "${RED}❌ ERROR: $1${NC}"
36+
}
37+
38+
print_warning() {
39+
echo -e "${YELLOW}⚠️ WARNING: $1${NC}"
40+
}
41+
42+
print_info() {
43+
echo -e "${CYAN}ℹ️ $1${NC}"
44+
}
45+
46+
print_section() {
47+
echo ""
48+
echo -e "${CYAN}$1${NC}"
49+
}
50+
51+
# Confirmation prompt
52+
confirm() {
53+
local prompt="$1"
54+
local response
55+
read -p "$(echo -e "${YELLOW}$prompt (yes/no)${NC}: ")" response
56+
[[ "$response" == "yes" ]] && return 0 || return 1
57+
}
58+
59+
# Main uninstall process
60+
main() {
61+
print_header
62+
63+
# Determine installation directory
64+
INSTALL_DIR="${RATIFACT_INSTALL_DIR:-.}"
65+
if [ ! -d "$INSTALL_DIR" ] || [ ! -f "$INSTALL_DIR/Cargo.toml" ]; then
66+
# Try to find it
67+
if [ -d "$HOME/ratifact" ]; then
68+
INSTALL_DIR="$HOME/ratifact"
69+
elif [ -d "/opt/ratifact" ]; then
70+
INSTALL_DIR="/opt/ratifact"
71+
else
72+
print_warning "Could not locate Ratifact installation directory"
73+
read -p "Enter the path to your Ratifact installation: " INSTALL_DIR
74+
if [ ! -d "$INSTALL_DIR" ] || [ ! -f "$INSTALL_DIR/Cargo.toml" ]; then
75+
print_error "Invalid installation directory: $INSTALL_DIR"
76+
exit 1
77+
fi
78+
fi
79+
fi
80+
81+
print_info "Found Ratifact installation at: $INSTALL_DIR"
82+
echo ""
83+
84+
# Confirmation
85+
echo -e "${YELLOW}This will:${NC}"
86+
echo " 1. Stop the PostgreSQL Docker container"
87+
echo " 2. Remove the PostgreSQL Docker volume (optional)"
88+
echo " 3. Clean build artifacts"
89+
echo " 4. Remove the installation directory (optional)"
90+
echo ""
91+
92+
if ! confirm "Do you want to continue with uninstallation?"; then
93+
print_info "Uninstallation cancelled"
94+
exit 0
95+
fi
96+
97+
print_section "Stopping Docker containers..."
98+
if cd "$INSTALL_DIR" 2>/dev/null; then
99+
if [ -f "compose.yml" ]; then
100+
if docker compose down 2>/dev/null; then
101+
print_success "Docker containers stopped"
102+
else
103+
print_warning "Could not stop Docker containers (they may not be running)"
104+
fi
105+
else
106+
print_warning "compose.yml not found"
107+
fi
108+
else
109+
print_warning "Could not change to installation directory"
110+
fi
111+
112+
# Ask about removing volume
113+
echo ""
114+
print_info "PostgreSQL data volume: ratifact-postgres-data"
115+
if confirm "Do you want to remove the PostgreSQL volume (this will delete all database data)?"; then
116+
print_section "Removing PostgreSQL volume..."
117+
if docker volume rm ratifact-postgres-data 2>/dev/null; then
118+
print_success "PostgreSQL volume removed"
119+
else
120+
print_warning "Could not remove volume (it may not exist)"
121+
fi
122+
else
123+
print_info "Keeping PostgreSQL volume"
124+
fi
125+
126+
# Clean build artifacts
127+
print_section "Cleaning build artifacts..."
128+
if [ -d "$INSTALL_DIR/target" ]; then
129+
if cd "$INSTALL_DIR" && cargo clean 2>/dev/null; then
130+
print_success "Build artifacts cleaned"
131+
else
132+
print_warning "Could not clean build artifacts"
133+
fi
134+
else
135+
print_info "No build artifacts found"
136+
fi
137+
138+
# Ask about removing installation directory
139+
echo ""
140+
if confirm "Do you want to remove the entire installation directory?"; then
141+
print_section "Removing installation directory..."
142+
if rm -rf "$INSTALL_DIR"; then
143+
print_success "Installation directory removed: $INSTALL_DIR"
144+
else
145+
print_error "Could not remove installation directory (permission denied?)"
146+
print_info "You can manually remove it with: rm -rf $INSTALL_DIR"
147+
exit 1
148+
fi
149+
else
150+
print_info "Keeping installation directory at: $INSTALL_DIR"
151+
fi
152+
153+
echo ""
154+
print_section "Uninstallation complete!"
155+
echo ""
156+
print_success "Ratifact has been successfully uninstalled"
157+
echo ""
158+
print_info "To reinstall, visit: https://github.com/adolfousier/ratifact"
159+
echo ""
160+
}
161+
162+
main "$@"

0 commit comments

Comments
 (0)