Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deb Package Workflow (#29) #33

Merged
merged 4 commits into from
Jun 25, 2024
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
20 changes: 18 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,31 @@ on:

env:
CARGO_TERM_COLOR: always
RELEASE_TAG: 0.5.1-1 # This is the version of the package, it should be updated with every release

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
run: cargo build --verbose --release
- name: Run tests
run: cargo test --verbose

- name: Create Debian package
uses: dominicorsi/[email protected]

- name: Upload Netscanner Debian Package (amd64)
uses: actions/upload-artifact@v4
with:
name: netscanner_${{ env.RELEASE_TAG }}_amd64.deb
path: netscanner_${{ env.RELEASE_TAG }}_amd64.deb

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: netscanner_${{ env.RELEASE_TAG }}_amd64.deb
37 changes: 36 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,48 @@ authors = ["Chleba <[email protected]>"]
repository = "https://github.com/Chleba/netscanner"
homepage = "https://github.com/Chleba/netscanner"

[package.metadata.deb]
maintainer = "Dominic Orsi <[email protected]>"
depends = "iw"
section = "utils"
priority = "optional"
changelog = "debian/changelog"
license-file = ["LICENSE", "4"]
extended-description = """\
Terminal Network scanner & diagnostic tool with modern TUI (terminal user interface). \n
GitHub: https://github.com/Chleba/netscanner"""
assets = [
[
"target/release/netscanner",
"usr/bin/",
"4755",
],
[
"README.md",
"usr/share/doc/netscanner/README",
"644",
],
[
"debian/netscanner.manpage",
"usr/share/man/man1/netscanner.1",
"644",
],
]

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

[dependencies]
better-panic = "0.3.0"
chrono = "0.4.31"
cidr = "0.2.2"
clap = { version = "4.4.5", features = ["derive", "cargo", "wrap_help", "unicode", "string", "unstable-styles"] }
clap = { version = "4.4.5", features = [
"derive",
"cargo",
"wrap_help",
"unicode",
"string",
"unstable-styles",
] }
color-eyre = "0.6.2"
config = "0.13.3"
crossterm = { version = "0.27.0", features = ["serde", "event-stream"] }
Expand Down
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
netscanner (0.5.1-1) stable; urgency=medium

* Initial release.

-- Dominic Orsi <[email protected]> Sun, 23 Jun 2024 17:25:30 -0700
29 changes: 29 additions & 0 deletions debian/netscanner.manpage
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.\" Manpage for netscanner.
.\" Contact [email protected] to correct errors or typos.
.TH man 1 "22 June 2024" "1.0" "netscanner man page"
.SH NAME
netscanner \- view and scan connected networks
DominicOrsi marked this conversation as resolved.
Show resolved Hide resolved
.SH SYNOPSIS
.B netscanner
[\fIOPTION\fR]...
.SH DESCRIPTION
.B netscanner
is a terminal network scanner & diagnostic tool with modern TUI.
.SH OPTIONS
.TP
.BR \-t ", " \-\-tick\-rate " " \fIFLOAT\fR
Tick rate, i.e. number of ticks per second [default: 1]
.TP
.BR \-f ", " \-\-frame\-rate " " \fIFLOAT\fR
Frame rate, i.e. number of frames per second [default: 10]
.TP
.BR \-h ", " \-\-help
Print help
.TP
.BR \-V ", " \-\-version
Print version
.SH BUGS
See GitHub issues:
https://github.com/chleba/netscanner/issues
.SH AUTHOR
Dominic Orsi <[email protected]>