Skip to content

Commit

Permalink
Add clap and set up CLI options
Browse files Browse the repository at this point in the history
  • Loading branch information
GRA0007 committed Jul 18, 2023
0 parents commit d0b26f8
Show file tree
Hide file tree
Showing 8 changed files with 541 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check

on:
pull_request:
paths:
- src/**
- Cargo.lock
- Cargo.toml
- .github/workflows/check.yml
push:
branches:
- main
paths:
- src/**
- Cargo.lock
- Cargo.toml
- .github/workflows/check.yml

# Fail on warnings
env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cargo clippy

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cargo test
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
306 changes: 306 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "favicon-rover"
version = "0.1.0"
edition = "2021"
description = "A web service and CLI tool to fetch the favicon of any website"
keywords = ["favicon", "scraper", "icon"]
repository = "https://github.com/stevent-team/favicon-rover"
license = "MIT"
authors = ["Benji Grant", "Ewan Breakey"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4.3.15", features = ["derive"] }
Loading

0 comments on commit d0b26f8

Please sign in to comment.