Skip to content

Commit

Permalink
Binary and Deb
Browse files Browse the repository at this point in the history
  • Loading branch information
aceberg committed Jun 28, 2023
1 parent 304efb3 commit 6750095
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=0.2.0
VERSION=0.2.1
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [0.2.1] - 2023-06-28
### Added
- Binary and Deb release

## [0.2.0] - 2023-06-27
### Added
- Edit everything in GUI
Expand Down
35 changes: 35 additions & 0 deletions build/ci/build-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

PKGNAME=miniboard
PKGDIR=$PKGNAME-$1-0_all

umask 0022

mkdir -p $PKGDIR/usr/bin
mkdir -p $PKGDIR/lib/systemd/system

cp configs/$PKGNAME.service $PKGDIR/lib/systemd/system/
cp configs/$PKGNAME@.service $PKGDIR/lib/systemd/system/

cp $PKGNAME $PKGDIR/usr/bin/

mkdir -p $PKGDIR/DEBIAN

echo "Package: $PKGNAME
Version: $1
Section: utils
Priority: optional
Architecture: all
Maintainer: aceberg <aceberg_a@proton.me>
Description: Lightweight Dashboard with Tabs and online status check
" > $PKGDIR/DEBIAN/control

echo "
systemctl daemon-reload
" > $PKGDIR/DEBIAN/postinst

chmod 775 $PKGDIR/DEBIAN/postinst

dpkg-deb --build --root-owner-group $PKGDIR

rm -rf $PKGDIR
20 changes: 20 additions & 0 deletions build/ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

PKGNAME=miniboard
PKGDIR=/opt/$PKGNAME

cd cmd/$PKGNAME/ && CGO_ENABLED=0 go build -o ../../$PKGNAME .
cd ../../

umask 0022

mkdir -p $PKGDIR
cp $PKGNAME $PKGDIR/
cp configs/$PKGNAME.service $PKGDIR/
cp configs/$PKGNAME@.service $PKGDIR/
cp configs/install.sh $PKGDIR/

cd /opt
tar cvzf $PKGNAME-$1.tar.gz $PKGNAME
cd -
cp /opt/$PKGNAME-$1.tar.gz .
5 changes: 5 additions & 0 deletions configs/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

cp miniboard /usr/bin/
cp miniboard.service /lib/systemd/system/
cp miniboard@.service /lib/systemd/system/
12 changes: 12 additions & 0 deletions configs/miniboard.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=miniboard
Documentation=https://github.com/aceberg/miniboard
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/miniboard -c /etc/miniboard/config.yaml -b /etc/miniboard/board.yaml
Restart=on-failure

[Install]
WantedBy=multi-user.target
13 changes: 13 additions & 0 deletions configs/miniboard@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=miniboard
Documentation=https://github.com/aceberg/miniboard
After=network-online.target
Wants=network-online.target

[Service]
User=%i
ExecStart=/usr/bin/miniboard -c /home/%i/.config/miniboard/config.yaml -b /home/%i/.config/miniboard/board.yaml
Restart=on-failure

[Install]
WantedBy=multi-user.target

0 comments on commit 6750095

Please sign in to comment.