Skip to content

Commit aac9bee

Browse files
committed
Release v0.1.12 - Cross-platform support and path exclusion feature
Add complete cross-platform installation support with one-liner setup scripts for Linux, macOS, and Windows. Users can now easily install Ratifact on any platform with automated dependency installation. New path exclusion feature allows users to exclude specific directories from scans using the 'x' keyboard shortcut. Excluded paths are stored in config.toml and can be managed through the Settings menu. Confirmation dialogs ensure safe exclusion/restoration operations with automatic rescan when paths are restored. Features: - Cross-platform installation scripts (Linux/macOS/Windows) - Path exclusion with 'x' shortcut in Artifacts panel - Excluded paths management in Settings menu - Exclusion confirmation dialogs - Persistent exclusion list in config.toml - Automatic rescan when restoring excluded paths - Settings panel displays count of excluded paths - Updated footer with new shortcuts Breaking Changes: None Migration: None required
1 parent 8523984 commit aac9bee

File tree

14 files changed

+685
-37
lines changed

14 files changed

+685
-37
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ 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.12] - 2025-10-30
9+
10+
### Added
11+
12+
- **Cross-platform installation support** - Complete setup scripts for Linux, macOS, and Windows
13+
- **Linux installation script** (src/scripts/linux/install.sh) - Automatic dependency installation and build
14+
- **macOS installation script** (src/scripts/macos/install.sh) - Homebrew-based setup with Docker Desktop integration
15+
- **Windows installation script** (src/scripts/windows/install.ps1) - PowerShell-based setup using winget package manager
16+
- **Path exclusion feature** - New 'x' keyboard shortcut to exclude artifacts from future scans
17+
- **Excluded paths management** - New "Excluded Paths" option in Settings menu to view and manage excluded paths
18+
- **Exclusion confirmation dialogs** - Confirmation prompts when excluding paths and removing from exclusion list
19+
- **Excluded paths persistence** - Excluded paths are stored in config.toml and persist across sessions
20+
- **Excluded paths display** - Settings panel shows count of excluded paths
21+
22+
### Changed
23+
24+
- Updated README with one-liner installation commands for all platforms
25+
- Footer shortcuts now include 'x: Exclude' option
26+
- Settings menu expanded from 3 to 4 options: Retention Days, Scan Path, Automatic Removal, and Excluded Paths
27+
- Scan logic now respects excluded paths and skips them during artifact discovery
28+
- Automatic rescan triggered when removing a path from exclusion list
29+
- Updated "Works everywhere" claim to reflect full cross-platform support
30+
31+
---
32+
833
## [0.1.11] - 2025-10-29
934

1035
### Fixed

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.11"
3+
version = "0.1.12"
44
edition = "2024"
55

66
[dependencies]

README.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,43 @@ This TUI app runs in your terminal and helps you monitor build processes, track
3131
- **Selective deletion** - Choose individual or bulk delete with confirmations.
3232
- **Timeframe cleanup** - Set rules to auto-remove old artifacts.
3333
- **Rebuild integration** - Trigger rebuilds for tracked projects.
34-
- **Works everywhere** - Currently tested on Linux (Wayland and X11); support for Windows and macOS may come soon.
34+
- **Works everywhere** - Fully supported on Linux, macOS, and Windows with easy one-liner installation.
3535

36-
## Quick Start
36+
## Quick Start (Easiest Way)
3737

38-
### Prerequisites
38+
### Linux
3939

40-
- [Rust](https://www.rust-lang.org/tools/install) installed
41-
- [Docker](https://www.docker.com/products/docker-desktop) for PostgreSQL
42-
- PostgreSQL running (use provided compose.yml)
40+
Copy and paste this into your terminal:
4341

44-
### Installation
42+
```bash
43+
sudo apt update && sudo apt install -y curl git && curl -fsSL https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/linux/install.sh | bash
44+
```
45+
46+
That's it! The app will build and start automatically.
47+
48+
### macOS
49+
50+
1. Install [Docker Desktop](https://docs.docker.com/desktop/install/mac-install/) first (or the script will install it)
51+
2. Then paste this into Terminal:
52+
53+
```bash
54+
curl -fsSL https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/macos/install.sh | bash
55+
```
56+
57+
### Windows
58+
59+
Open PowerShell as Administrator and run:
60+
61+
```powershell
62+
powershell -Command "iwr -useb https://raw.githubusercontent.com/adolfousier/ratifact/main/src/scripts/windows/install.ps1 | iex"
63+
```
64+
65+
### Already Have Rust and Docker?
66+
67+
If you already have the prerequisites installed:
4568

4669
```bash
47-
git clone https://github.com/adolfousier/ratifact.git
48-
cd ratifact
49-
docker-compose up -d # Start PostgreSQL
50-
make build
51-
./target/debug/ratifact
70+
git clone https://github.com/adolfousier/ratifact.git && cd ratifact && cargo build && ./target/debug/ratifact
5271
```
5372

5473
### Build with Make

commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
goood now lets update to next version v0.1.1 on cargo and CHANGELOG new entry with the above, and then commit and push to main and new version with release notes similarly to last version
1+
goood now lets update to next version v0.1.12 on cargo and CHANGELOG new entry with the above, and then commit and push to main and new version with release notes similarly to last version
22

33

44

config.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/config/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ database_url = ""
22
scan_paths = ["/srv"]
33
retention_days = 1
44
debug_logs_enabled = true
5+
excluded_paths = []

src/config/settings.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub fn load_config() -> Config {
3434
scan_paths: vec![".".to_string()],
3535
retention_days: 30,
3636
debug_logs_enabled,
37+
excluded_paths: vec![],
3738
}
3839
}
3940

@@ -44,6 +45,7 @@ pub fn save_config(config: &Config) -> Result<(), Box<dyn std::error::Error>> {
4445
scan_paths: config.scan_paths.clone(),
4546
retention_days: config.retention_days,
4647
debug_logs_enabled: config.debug_logs_enabled,
48+
excluded_paths: config.excluded_paths.clone(),
4749
};
4850
let toml_string = toml::to_string(&save_config)?;
4951
fs::write("src/config/config.toml", toml_string)?;

src/config/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ pub struct Config {
99
pub retention_days: u32,
1010
#[serde(default)]
1111
pub debug_logs_enabled: bool,
12+
#[serde(default)]
13+
pub excluded_paths: Vec<String>,
1214
}
1315

1416
impl Default for Config {
@@ -18,6 +20,7 @@ impl Default for Config {
1820
scan_paths: vec![".".to_string()],
1921
retention_days: 30,
2022
debug_logs_enabled: false,
23+
excluded_paths: vec![],
2124
}
2225
}
2326
}

src/scripts/linux/install.sh

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
#!/bin/bash
2+
# Ratifact Installation Script for Linux
3+
# Complete one-liner setup: installs all dependencies and runs the app
4+
# This script is designed to be piped directly: bash -c "$(curl -fsSL https://...install.sh)"
5+
6+
set -e
7+
8+
# Color codes
9+
RED='\033[0;31m'
10+
GREEN='\033[0;32m'
11+
YELLOW='\033[1;33m'
12+
CYAN='\033[0;36m'
13+
NC='\033[0m' # No Color
14+
15+
# Logging setup
16+
LOG_FILE="/tmp/ratifact-install-$(date +%Y%m%d_%H%M%S).log"
17+
exec > >(tee -a "$LOG_FILE")
18+
exec 2>&1
19+
20+
echo "Installation log: $LOG_FILE"
21+
22+
# Helper functions
23+
print_header() {
24+
echo ""
25+
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════╗${NC}"
26+
echo -e "${CYAN}║ Ratifact Installation Script - Linux ║${NC}"
27+
echo -e "${CYAN}╚═══════════════════════════════════════════════════════════╝${NC}"
28+
echo ""
29+
}
30+
31+
print_success() {
32+
echo -e "${GREEN}$1${NC}"
33+
}
34+
35+
print_error() {
36+
echo -e "${RED}❌ ERROR: $1${NC}"
37+
}
38+
39+
print_warning() {
40+
echo -e "${YELLOW}⚠️ WARNING: $1${NC}"
41+
}
42+
43+
print_info() {
44+
echo -e "${CYAN}ℹ️ $1${NC}"
45+
}
46+
47+
print_section() {
48+
echo ""
49+
echo -e "${CYAN}$1${NC}"
50+
}
51+
52+
# Start installation
53+
print_header
54+
55+
# Security check - prompt user to review code
56+
print_section "Code Review Required"
57+
echo -e "${YELLOW}========================================${NC}"
58+
echo -e "${YELLOW}IMPORTANT: Please review the installation script${NC}"
59+
echo -e "${YELLOW}========================================${NC}"
60+
echo "This script will:"
61+
echo " - Check for: Rust, Docker, OpenSSL"
62+
echo " - Create a .env file with database credentials"
63+
echo " - Start PostgreSQL container via Docker Compose"
64+
echo " - Build the Ratifact application"
65+
echo ""
66+
echo "Script location: $0"
67+
echo ""
68+
69+
read -p "$(echo -e ${YELLOW})Have you reviewed the script and wish to continue? (yes/no)${NC}: " review_confirm
70+
if [[ "$review_confirm" != "yes" ]]; then
71+
echo -e "${YELLOW}Installation cancelled.${NC}"
72+
exit 0
73+
fi
74+
75+
# Detect Linux distribution
76+
print_section "Detecting Linux distribution"
77+
if [ -f /etc/os-release ]; then
78+
. /etc/os-release
79+
DISTRO=$ID
80+
print_success "Distribution detected: $PRETTY_NAME"
81+
else
82+
print_warning "Could not detect distribution. Assuming generic Linux."
83+
DISTRO="generic"
84+
fi
85+
86+
# Install system dependencies
87+
print_section "Installing system dependencies"
88+
case "$DISTRO" in
89+
ubuntu|debian)
90+
print_info "Installing packages via apt..."
91+
sudo apt-get update -qq
92+
sudo apt-get install -y -qq curl git openssl docker.io make > /dev/null 2>&1
93+
sudo usermod -aG docker $USER > /dev/null 2>&1
94+
print_success "System packages installed"
95+
;;
96+
fedora)
97+
print_info "Installing packages via dnf..."
98+
sudo dnf install -y -q curl git openssl docker make > /dev/null 2>&1
99+
sudo usermod -aG docker $USER > /dev/null 2>&1
100+
print_success "System packages installed"
101+
;;
102+
arch)
103+
print_info "Installing packages via pacman..."
104+
sudo pacman -S --noconfirm curl git openssl docker make > /dev/null 2>&1
105+
sudo usermod -aG docker $USER > /dev/null 2>&1
106+
print_success "System packages installed"
107+
;;
108+
*)
109+
print_warning "Unknown distribution. Please install: curl, git, openssl, docker, make"
110+
;;
111+
esac
112+
113+
# Install Rust
114+
print_section "Installing Rust"
115+
if command -v rustc &> /dev/null; then
116+
RUST_VERSION=$(rustc --version)
117+
print_success "Rust already installed: $RUST_VERSION"
118+
else
119+
print_info "Installing Rust via rustup..."
120+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --quiet > /dev/null 2>&1
121+
source $HOME/.cargo/env
122+
print_success "Rust installed: $(rustc --version)"
123+
fi
124+
125+
# Start Docker service
126+
print_section "Starting Docker service"
127+
sudo systemctl start docker > /dev/null 2>&1 || true
128+
sudo systemctl enable docker > /dev/null 2>&1 || true
129+
130+
# Check if Docker is accessible
131+
if ! docker ps > /dev/null 2>&1; then
132+
print_warning "Docker requires sudo. Running with sudo from now on..."
133+
DOCKER_PREFIX="sudo "
134+
else
135+
DOCKER_PREFIX=""
136+
fi
137+
138+
# Clone repository if not already in it
139+
if [ ! -f "Cargo.toml" ]; then
140+
print_section "Cloning Ratifact repository"
141+
git clone https://github.com/adolfousier/ratifact.git ratifact
142+
cd ratifact
143+
fi
144+
145+
# Generate .env file
146+
print_section "Setting up .env file"
147+
if [ ! -f ".env" ]; then
148+
print_info "Generating .env file with random credentials..."
149+
PASSWORD=$(openssl rand -base64 12 | tr -d "=+/" | cut -c1-16)
150+
151+
cat > .env << EOF
152+
DATABASE_URL=postgres://ratifact:${PASSWORD}@localhost:25851/ratifact
153+
POSTGRES_USERNAME=ratifact
154+
POSTGRES_PASSWORD=${PASSWORD}
155+
DEBUG_LOGS_ENABLED=true
156+
EOF
157+
print_success ".env file generated"
158+
else
159+
print_success ".env file already exists"
160+
fi
161+
162+
# Start PostgreSQL container
163+
print_section "Starting PostgreSQL"
164+
print_info "Starting PostgreSQL container via Docker Compose..."
165+
${DOCKER_PREFIX}docker compose up -d > /dev/null 2>&1
166+
print_success "PostgreSQL container started"
167+
print_info "Waiting for PostgreSQL to be ready (30 seconds)..."
168+
sleep 30
169+
170+
# Build and run the project
171+
print_section "Building Ratifact"
172+
print_info "Running cargo build..."
173+
cargo build 2>&1 | grep -E "Finished|error" || true
174+
if [ ${PIPESTATUS[0]} -eq 0 ]; then
175+
print_success "Build completed successfully"
176+
else
177+
print_error "Build failed"
178+
exit 1
179+
fi
180+
181+
# Completion message
182+
echo ""
183+
echo -e "${GREEN}╔═══════════════════════════════════════════════════════════╗${NC}"
184+
echo -e "${GREEN}║ Setup Completed Successfully! ║${NC}"
185+
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════╝${NC}"
186+
echo ""
187+
echo -e "${CYAN}To run Ratifact:${NC}"
188+
echo " cargo run"
189+
echo ""
190+
echo -e "${CYAN}To build a release version:${NC}"
191+
echo " cargo build --release"
192+
echo ""
193+
echo -e "${CYAN}To run tests:${NC}"
194+
echo " cargo test"
195+
echo ""
196+
echo -e "${YELLOW}Installation log saved to: $LOG_FILE${NC}"
197+
echo ""

0 commit comments

Comments
 (0)