Skip to content

Commit 3c9335f

Browse files
Adwait DeshpandeAdwait Deshpande
authored andcommitted
init: devspace-sweeper MVP
1 parent bc3dd94 commit 3c9335f

File tree

17 files changed

+1716
-1
lines changed

17 files changed

+1716
-1
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-test:
11+
name: build-test
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest]
17+
toolchain: [stable]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Install Rust
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: ${{ matrix.toolchain }}
27+
profile: minimal
28+
override: true
29+
30+
- name: Cache cargo
31+
uses: Swatinem/rust-cache@v2
32+
33+
- name: Build
34+
run: cargo build --verbose
35+
36+
- name: Clippy
37+
run: cargo clippy --all-targets -- -D warnings
38+
39+
- name: Test
40+
run: cargo test --verbose

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build-release:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest, macos-latest]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: stable
24+
profile: minimal
25+
override: true
26+
27+
- name: Cache cargo
28+
uses: Swatinem/rust-cache@v2
29+
30+
- name: Build release
31+
run: cargo build --release
32+
33+
- name: Package binary (tar.gz)
34+
shell: bash
35+
run: |
36+
APP=devspace-sweeper
37+
BIN=target/release/$APP
38+
if [[ "${{ runner.os }}" == "macOS" ]]; then
39+
PLATFORM=macos
40+
else
41+
PLATFORM=linux
42+
fi
43+
mkdir -p dist
44+
cp "$BIN" "dist/$APP-$PLATFORM"
45+
tar -C dist -czf "$APP-$PLATFORM.tar.gz" "$APP-$PLATFORM"
46+
47+
- name: Upload Release Asset
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
files: |
51+
devspace-sweeper-*.tar.gz
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
target/
2+
**/*.swp
3+
.DS_Store
4+
/.idea/
5+
/.vscode/
6+
report.md

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing to DevSpace Sweeper
2+
3+
Thanks for your interest in contributing!
4+
5+
## Getting started
6+
7+
- Requires Rust (rustup recommended). Build with:
8+
- `cargo build`
9+
- `cargo run -- scan --path .`
10+
- Recipes live in `recipes/default.yml`.
11+
12+
## Development
13+
14+
- Run clippy and tests:
15+
- `cargo clippy --all-targets -- -D warnings`
16+
- `cargo test`
17+
- Submit small, focused PRs.
18+
- Add or update docs when changing behavior.
19+
20+
## Feature ideas
21+
22+
- Windows support
23+
- Interactive TUI mode
24+
- CI cache hints generator
25+
26+
## Code of Conduct
27+
28+
Be respectful and constructive. We welcome first-time contributors!

0 commit comments

Comments
 (0)