cleansys 0.0.11

A simple and efficient CLI tool to clean your Linux system
# CleanSys Development Tasks
# Install just: cargo install just
# Usage: just <task>

# Default task - show available commands
default:
    @just --list

# Build the project
build:
    cargo build

# Build release version
build-release:
    cargo build --release

# Run the application
run:
    cargo run

# Run tests
test:
    cargo test

# Check code without building
check:
    cargo check

# Format code
fmt:
    cargo fmt

# Check if code is formatted
fmt-check:
    cargo fmt --check

# Run clippy linter
clippy:
    cargo clippy -- -D warnings

# Run all checks (fmt, clippy, test)
check-all: fmt-check clippy test
    @echo "✅ All checks passed!"

# Clean build artifacts
clean:
    cargo clean

# Install the application locally
install:
    cargo install --path .

# Generate changelog
changelog:
    git-cliff -o CHANGELOG.md
    @echo "✅ Changelog generated!"

# Generate changelog for unreleased commits
changelog-unreleased:
    git-cliff --unreleased -o CHANGELOG.md
    @echo "✅ Unreleased changelog generated!"

# Generate changelog for specific version
changelog-version version:
    git-cliff --tag v{{version}} -o CHANGELOG.md
    @echo "✅ Changelog generated for version {{version}}!"

# Bump version (usage: just bump 0.2.5)
bump version:
    @echo "Bumping version to {{version}}..."
    @./scripts/bump_version.sh {{version}}

# Quick release: format, check, test, and build
release-check: fmt clippy test build-release
    @echo "✅ Ready for release!"

# Publish to crates.io (dry run)
publish-dry:
    cargo publish --dry-run

# Publish to crates.io
publish:
    cargo publish

# Update dependencies
update:
    cargo update

# Show outdated dependencies
outdated:
    cargo outdated

# Generate documentation
doc:
    cargo doc --no-deps --open

# Watch and auto-run on file changes (requires cargo-watch)
watch:
    cargo watch -x run

# Git: commit current changes
commit message:
    git add .
    git commit -m "{{message}}"

# Git: push to origin
push:
    git push origin main

# Git: push tags
push-tags:
    git push --tags

# Full release workflow: bump version and push
release version: (bump version)
    @echo "Pushing to remote..."
    git push origin main
    @echo "Pushing tag v{{version}}..."
    git push origin v{{version}}
    @echo "Verifying tag was pushed..."
    @if git ls-remote --tags origin | grep -q "refs/tags/v{{version}}"; then \
        echo "✅ Release v{{version}} complete! Release workflow should trigger shortly."; \
    else \
        echo "⚠️  Warning: Tag v{{version}} may not have been pushed successfully!"; \
        exit 1; \
    fi

# Show current version
version:
    @grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/'

# Show project info
info:
    @echo "Project: CleanSys"
    @echo "Version: $(just version)"
    @echo "Author: Sorin Albu-Irimies"
    @echo "License: MIT"

# View changelog
view-changelog:
    @cat CHANGELOG.md