Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/test.yml β†’ .github/workflows/bash-ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
name: Tests
name: Bash CI

on:
push:
branches: [ main ]
paths:
- 'bash/**'
- '.github/workflows/bash-ci.yml'
pull_request:
branches: [ main ]
paths:
- 'bash/**'
- '.github/workflows/bash-ci.yml'

defaults:
run:
working-directory: bash

jobs:
test:
runs-on: macos-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Syntax check
run: make check

- name: Install bashunit
run: make install-bashunit

- name: Run tests
run: make test

- name: Lint with shellcheck
run: |
if command -v shellcheck >/dev/null 2>&1; then
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/net-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: .NET CI

# Temporarily disabled until .NET project is initialized (Issue #25)
# Will be enabled automatically once net/ directory contains .NET project files
on:
workflow_dispatch: # Manual trigger only for now
# Uncomment when .NET project is ready:
# push:
# branches: [ main ]
# paths:
# - 'net/**'
# - '.github/workflows/net-ci.yml'
# pull_request:
# branches: [ main ]
# paths:
# - 'net/**'
# - '.github/workflows/net-ci.yml'

defaults:
run:
working-directory: net

jobs:
build-and-test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Run tests
run: dotnet test --no-build --configuration Release --verbosity normal

- name: Publish AOT (Release)
if: matrix.os == 'macos-latest'
run: dotnet publish -c Release -r osx-arm64
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,52 @@ build/
# Local environment
.env
.env.local

# .NET
## Build results
[Bb]in/
[Oo]bj/
[Oo]ut/

## User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

## Visual Studio
.vs/
.vscode/

## Rider
.idea/

## Build artifacts
*.exe
*.dll
*.pdb
*.cache
*.vsidx
*.vspscc
*.vssscc

## Test results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.trx
*.coverage
*.coveragexml

## NuGet
*.nupkg
*.snupkg
packages/
!**/packages/build/

## AOT
*.staticwebassetsruntime.json
*.runtimeconfig.json

## Benchmark results
BenchmarkDotNet.Artifacts/
115 changes: 115 additions & 0 deletions PROGRESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# DevSweep Migration Progress

## Overview

DevSweep is migrating from Bash (v1.x) to .NET 10 AOT (v2.x) to provide cross-platform support for macOS, Linux, and Windows while maintaining clean architecture principles.

## Repository Structure

```
dev_sweep/
β”œβ”€β”€ bash/ # v1.x - Production Bash version (macOS only)
β”œβ”€β”€ net/ # v2.x - .NET 10 AOT version (cross-platform) [WIP]
└── [common files] # README, CONTRIBUTING, LICENSE, etc.
```

## Migration Roadmap

### βœ… Phase 0: Foundation
- [x] **#45** - Repository restructuring for bash and .NET coexistence
- [ ] **#46** - Create marketing website with Astro Starlight

### 🚧 Phase 1: Foundation (Parallel)
- [ ] **#25** - Initialize .NET 10 solution with hexagonal folder structure
- [ ] **#26** - Implement domain value objects and enums
- [ ] **#27** - Implement domain entities and services

### ⏳ Phase 2: Application Layer
*Depends on Phase 1*

- [ ] **#28** - Define port interfaces and module contracts
- [ ] **#29** - Implement use cases

### ⏳ Phase 3: Infrastructure Adapters
*Depends on Phase 2, can run in parallel*

- [ ] **#30** - Implement file system adapter
- [ ] **#31** - Implement process and command adapters
- [ ] **#32** - Implement cross-platform environment provider

### ⏳ Phase 4: Cleanup Modules
*Depends on Phase 3, all run in parallel*

- [ ] **#33** - Implement JetBrains cleanup module
- [ ] **#34** - Implement Docker cleanup module
- [ ] **#35** - Implement Homebrew cleanup module
- [ ] **#36** - Implement DevTools cleanup module
- [ ] **#37** - Implement stale projects cleanup module
- [ ] **#38** - Implement system cleanup module

### ⏳ Phase 5: CLI Presentation
*Depends on Phase 4*

- [ ] **#39** - Implement CLI subcommands
- [ ] **#40** - Implement output formatters and interaction strategies
- [ ] **#41** - Wire DI composition root

### ⏳ Phase 6: E2E and Polish
*Depends on Phase 5, can run in parallel*

- [ ] **#42** - Add E2E smoke tests
- [ ] **#43** - Cross-platform CI pipeline
- [ ] **#44** - Documentation and README update

## Technical Stack

| Package | Purpose | Justification |
|---------|---------|---------------|
| .NET 10 AOT | Runtime + native compilation | LTS, ~75% faster cold starts, self-contained binaries |
| DotMake.CommandLine | CLI parsing | Source generators, zero reflection, AOT native |
| Spectre.Console | Terminal UI | Rich UI (tables, spinners, colors), AOT compatible |
| xUnit | Testing | Industry standard |
| FluentAssertions | Readable assertions | `.Should().BeEmpty()` |
| NSubstitute | Mocking | Clean syntax |

## Architecture

**Hexagonal Architecture** (single .csproj with folder separation):

```
Domain (pure logic, zero dependencies)
↑
Application (ports + use cases + ICleanupModule contracts)
↑
Infrastructure (adapters: CLI, FileSystem, Process, Modules)
```

### Modules (Strategy Pattern)
- **JetBrains** - IDE caches and config (macOS, Linux, Windows)
- **Docker** - Container images, volumes, build cache (macOS, Linux, Windows)
- **Homebrew** - Package cache and diagnostics (macOS, Linux)
- **DevTools** - Maven, Gradle, Node, Python, SDKMAN caches (macOS, Linux, Windows)
- **Projects** - Stale project detection and node_modules cleanup (macOS, Linux, Windows)
- **System** - OS caches, logs, temp files (macOS, Linux, Windows)

### Output Strategies (MCP preparation)
- **Rich** - Colored terminal output with Spectre.Console (default)
- **Plain** - Plain text for CI/CD and scripting
- **JSON** - Structured output for MCP server and programmatic use

### Interaction Strategies (MCP preparation)
- **Interactive** - Prompts and confirmations for CLI users
- **AutoConfirm** - Non-interactive mode for MCP server and CI/CD

## Current Status

**Phase 0** is in progress. The repository has been restructured to support parallel development of both versions.

**Bash version (v1.x)**: Stable, production-ready, located in `bash/`
**NET version (v2.x)**: Not started yet, will be located in `net/`

## Contributing

For contribution guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md).

For the complete technical plan, see the [migration plan](https://github.com/aitorsantana/dev_sweep/issues/45).
Loading