Skip to content

Commit 29416f0

Browse files
committed
Adding Debian package builds
1 parent 925da62 commit 29416f0

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

release.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This script helps with the release process on Github (musl & glibc builds for Linux)
55

66
mkdir -p ./builds
7-
rm ./builds/*
7+
rm -rf ./builds/*
88

99
CLI_VERSION=$(/usr/bin/cat Cargo.toml | egrep "version = (.*)" | egrep -o --color=never "([0-9]+\.?){3}" | head -n 1)
1010
echo "Releasing v$CLI_VERSION for GNU & musl targets"
@@ -19,6 +19,17 @@ cargo build --release --target=x86_64-unknown-linux-gnu --locked
1919
cp -p ./target/x86_64-unknown-linux-gnu/release/arp-scan ./builds/arp-scan-v$CLI_VERSION-x86_64-unknown-linux-glibc
2020
./builds/arp-scan-v$CLI_VERSION-x86_64-unknown-linux-glibc --version
2121

22+
# Build the deb archive
23+
mkdir -p ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/DEBIAN
24+
echo "Package: arp-scan-rs" > ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/DEBIAN/control
25+
echo "Version: 0.13.0" >> ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/DEBIAN/control
26+
echo "Architecture: all" >> ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/DEBIAN/control
27+
echo "Maintainer: Saluki" >> ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/DEBIAN/control
28+
echo "Description: Minimalist ARP scan written in Rust" >> ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/DEBIAN/control
29+
mkdir -p ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/usr/local/bin
30+
cp ./builds/arp-scan-v$CLI_VERSION-x86_64-unknown-linux-glibc ./builds/arp-scan-rs_$CLI_VERSION-1_amd64/usr/local/bin/arp-scan
31+
(cd ./builds && dpkg-deb --build --root-owner-group arp-scan-rs_0.13.0-1_amd64)
32+
2233
echo "Update the README instructions for v$CLI_VERSION"
2334
echo " ✓ Publish on crates.io"
24-
echo " ✓ Release on Github with Git tag v$CLI_VERSION"
35+
echo " ✓ Release on Github with Git tag v$CLI_VERSION"

0 commit comments

Comments
 (0)