From 85730bafb0fba735bea73a2e8e2f001293f6f435 Mon Sep 17 00:00:00 2001 From: ssh-monitor Date: Tue, 14 Apr 2026 13:52:26 +1000 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=B5=D1=80=D1=81=D0=B8=D1=8F=201.0.0:?= =?UTF-8?q?=20=D1=80=D0=B5=D0=BB=D0=B8=D0=B7,=20Makefile=20(make=20dist),?= =?UTF-8?q?=20README=20=D0=B8=20.gitignore=20=D0=B4=D0=BB=D1=8F=20=D0=B0?= =?UTF-8?q?=D1=80=D1=85=D0=B8=D0=B2=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ Makefile | 12 ++++++++++++ README.md | 10 ++++++++++ ssh-monitor | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 7113d5c..e405477 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .DS_Store CalculatorApp/ +# Артефакты локальной сборки (релизные архивы грузятся в GitHub Releases, в git не коммитим) +ssh-monitor-*.tar.gz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b11f9d8 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +# Версия берётся из ssh-monitor (SSH_MONITOR_VERSION). +.PHONY: dist clean-dist +VERSION := $(shell sed -n 's/^SSH_MONITOR_VERSION="\(.*\)".*/\1/p' ssh-monitor | head -n1) +DIST := ssh-monitor-$(VERSION).tar.gz + +dist: $(DIST) + +$(DIST): ssh-monitor + git archive --format=tar.gz --prefix=ssh-monitor-$(VERSION)/ -o $(DIST) HEAD + +clean-dist: + rm -f ssh-monitor-*.tar.gz diff --git a/README.md b/README.md index 889fbf1..8c13cd8 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,16 @@ sudo bash ./ssh-monitor --dry-run bash -n ./ssh-monitor ``` +## Релизный архив + +Версия задаётся в скрипте переменной **`SSH_MONITOR_VERSION`** (текущая стабильная — **1.0.0**). Сборка tarball из текущего git-дерева: + +```bash +make dist +``` + +Появится файл `ssh-monitor-<версия>.tar.gz` (через `git archive`). Готовые архивы для установки без клона репозитория прикладываются к [релизам на GitHub](https://github.com/PTah/ssh-monitor/releases). + ## Автозапуск через systemd 1. Скопируйте скрипт в постоянное место: diff --git a/ssh-monitor b/ssh-monitor index ff488b4..d4f1014 100644 --- a/ssh-monitor +++ b/ssh-monitor @@ -7,7 +7,7 @@ IFS=$'\n\t' # ============================================ CONFIG_FILE="/etc/ssh-monitor.conf" -SSH_MONITOR_VERSION="0.10.0.0" +SSH_MONITOR_VERSION="1.0.0" TELEGRAM_BOT_TOKEN="" TELEGRAM_CHAT_ID=""