-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathrelease.sh
executable file
·32 lines (26 loc) · 1007 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -euxo pipefail
: 'Checking for fpm Ruby gem, installing if not present'
installed=`gem list -i fpm` || true
if [ $installed = 'false' ]; then
gem install fpm
fi
: 'Running the build'
cargo build --target x86_64-unknown-linux-gnu -p inputmodule-control
: "Packaging"
fpm \
-s dir -t deb \
-p release/framework-inputmodule-rs-0.0.1.deb \
--name framework-inputmodule-rs \
--version 0.0.1 \
--architecture all \
--description "framework-inputmodule-rs runs Framework Laptop 16 input modules and keeps their firmware up to date" \
--url "https://frame.work" \
--maintainer "Framework <[email protected]>" \
--deb-systemd ./release/framework-inputmodule-rs.service \
--deb-systemd-enable \
--deb-systemd-auto-start \
--deb-systemd-restart-after-upgrade \
--after-install ./release/postinstall.sh \
target/x86_64-unknown-linux-gnu/debug/inputmodule-control=/usr/bin/framework-inputmodule-rs
: 'Packaging successful, install with "sudo dpkg -i <pkg-name>.deb"'