diff --git a/.version b/.version index 63700cc..bdbf6a1 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -VERSION=0.2.0 \ No newline at end of file +VERSION=0.2.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a6351f4..3d86e10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/build/ci/build-deb.sh b/build/ci/build-deb.sh new file mode 100755 index 0000000..603e0f3 --- /dev/null +++ b/build/ci/build-deb.sh @@ -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 +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 \ No newline at end of file diff --git a/build/ci/build.sh b/build/ci/build.sh new file mode 100755 index 0000000..8e90825 --- /dev/null +++ b/build/ci/build.sh @@ -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 . \ No newline at end of file diff --git a/configs/install.sh b/configs/install.sh new file mode 100755 index 0000000..f141e59 --- /dev/null +++ b/configs/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cp miniboard /usr/bin/ +cp miniboard.service /lib/systemd/system/ +cp miniboard@.service /lib/systemd/system/ \ No newline at end of file diff --git a/configs/miniboard.service b/configs/miniboard.service new file mode 100644 index 0000000..6c0d728 --- /dev/null +++ b/configs/miniboard.service @@ -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 \ No newline at end of file diff --git a/configs/miniboard@.service b/configs/miniboard@.service new file mode 100644 index 0000000..e23d59f --- /dev/null +++ b/configs/miniboard@.service @@ -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 \ No newline at end of file