release 1.7.0: --ver/--version/-V prints version, commit, repo

This commit is contained in:
Hernâni Marques 2026-07-19 00:30:34 +02:00
parent 8d6aabaab6
commit 4a4a9cd0ad
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
4 changed files with 71 additions and 7 deletions

View file

@ -14,6 +14,7 @@ Mail (firefly/pixel): `./taler-monitoring.sh mail`
Full local GOA example: `./taler-monitoring.sh -d hacktivism.ch urls inside versions`
Repo: https://git.hacktivism.ch/hernani/taler-monitoring · tree: `~/src/taler-monitoring`
Version: `./taler-monitoring.sh --ver` (or `--version` / `-V`)
Host packages (koopa / runners): **[DEPENDENCIES.md](./DEPENDENCIES.md)**.
Host-agents (GOA + FP; shared report pipeline): **[host-agent/README.md](./host-agent/README.md)**.

View file

@ -1 +1 @@
1.6.0
1.7.0

View file

@ -13,11 +13,12 @@ Tags and `VERSION` use **MAJOR.FEATURE.FIX** (three components):
| **FEATURE** | New capabilities (phases, HTML features, i18n packs, …) |
| **FIX** | Bugfixes and docs that do not add a feature |
Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.6.0`). File `VERSION` omits the `v` prefix.
Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.7.0`). File `VERSION` omits the `v` prefix.
| Tag | Date (UTC) | Notes |
|-----|------------|--------|
| **v1.7.0** | *planned* | **L10n** packs for user-facing strings that need localization: **fr-CH** (FrancPaysan) and **de-CH** (hacktivism / Taler CH German). |
| **v1.8.0** | *planned* | **L10n** packs for user-facing strings that need localization: **fr-CH** (FrancPaysan) and **de-CH** (hacktivism / Taler CH German). |
| **v1.7.0** | 2026-07-18 | **CLI version:** `./taler-monitoring.sh --ver` / `--version` / `-V` prints suite version, git commit, branch, and repo/tag/commit URLs. |
| **v1.6.0** | 2026-07-18 | **Mail monitoring:** phase `mail` (`check_mail.sh` + `mail-catalog.conf`) for **firefly** (taler.net, gnunet.org) and **pixel**/TSA (taler-systems.com, mail.anastasis.lu); MX/SMTP/IMAP/SPF/DMARC; host-agent `/taler-monitoring-mail*`. |
| **v1.5.0** | 2026-07-18 | **Mattermost monitoring:** phase `mattermost` (`check_mattermost.sh`) for `mattermost.taler.net` (SPA + `/api/v4/system/ping` + TLS); host-agent HTML `/taler-monitoring-mattermost*`; hourly timer. |
| **v1.4.1** | 2026-07-18 | **Docs/versioning:** canonical tree `~/src/taler-monitoring`; docs use generic ops/outside-runner wording (no client hostnames); tags always **MAJOR.FEATURE.FIX**. |
@ -34,7 +35,7 @@ Older short tags (`v1`, `v1.0`, `v1.1`, `v1.2`, `v1.3`) are obsolete; use the th
## Sticky bar version (v1.3.0+)
Generated HTML shows the installed release tag (e.g. `v1.6.0`) next to the host line.
Generated HTML shows the installed release tag (e.g. `v1.7.0`) next to the host line.
Clicking opens the tag page on Forgejo:
`https://git.hacktivism.ch/hernani/taler-monitoring/src/tag/<tag>`
@ -66,11 +67,11 @@ sudo ~/koopa-caddy/apply-monitoring-live.sh
| Env | `TALER_MON_LANG=en` or `fr` |
| Auto | `*lefrancpaysan*` → fr, else en |
Full locale packs (fr-CH / de-CH) are scheduled for **v1.7.0**.
Full locale packs (fr-CH / de-CH) are scheduled for **v1.8.0**.
## Pin a release
```bash
git clone https://git.hacktivism.ch/hernani/taler-monitoring.git ~/src/taler-monitoring
cd ~/src/taler-monitoring && git checkout v1.6.0
cd ~/src/taler-monitoring && git checkout v1.7.0
```

View file

@ -12,6 +12,66 @@
set -euo pipefail
ROOT=$(cd "$(dirname "$0")" && pwd)
# --- suite identity (also: --ver / --version / -V) ---
SOURCE_REPO_WEB="${SOURCE_REPO_WEB:-https://git.hacktivism.ch/hernani/taler-monitoring}"
SOURCE_REPO_GIT="${SOURCE_REPO_GIT:-https://git.hacktivism.ch/hernani/taler-monitoring.git}"
print_version() {
local ver tag commit commit_full dirty branch
ver="unknown"
if [ -f "$ROOT/VERSION" ]; then
ver=$(tr -d "[:space:]" <"$ROOT/VERSION" | sed "s/^v//")
fi
tag=""
commit="unknown"
commit_full=""
branch=""
dirty=""
if git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1; then
tag=$(git -C "$ROOT" describe --tags --exact-match 2>/dev/null || true)
if [ -z "$tag" ]; then
tag=$(git -C "$ROOT" describe --tags --abbrev=0 2>/dev/null || true)
fi
commit=$(git -C "$ROOT" rev-parse --short=12 HEAD 2>/dev/null || echo unknown)
commit_full=$(git -C "$ROOT" rev-parse HEAD 2>/dev/null || true)
branch=$(git -C "$ROOT" rev-parse --abbrev-ref HEAD 2>/dev/null || true)
if [ -n "$(git -C "$ROOT" status --porcelain 2>/dev/null)" ]; then
dirty=" (dirty)"
fi
fi
if [ -n "$tag" ] && [ "$tag" = "v$ver" ]; then
printf "taler-monitoring %s\n" "$tag"
else
printf "taler-monitoring v%s\n" "$ver"
fi
printf "version: %s\n" "$ver"
if [ -n "$tag" ]; then
if [ "$tag" = "v$ver" ]; then
printf "tag: %s\n" "$tag"
else
printf "git-tag: %s (tree; VERSION file is %s)\n" "$tag" "$ver"
fi
fi
printf "commit: %s%s\n" "$commit" "$dirty"
[ -n "$branch" ] && [ "$branch" != "HEAD" ] && printf "branch: %s\n" "$branch"
printf "repo: %s\n" "$SOURCE_REPO_WEB"
printf "clone: %s\n" "$SOURCE_REPO_GIT"
if [ -n "$commit_full" ]; then
printf "commit-url: %s/src/commit/%s\n" "$SOURCE_REPO_WEB" "$commit_full"
fi
if [ -n "$tag" ]; then
printf "tag-url: %s/src/tag/%s\n" "$SOURCE_REPO_WEB" "$tag"
fi
}
# Fast path: version before loading lib.sh / phases
case "${1:-}" in
--ver|--version|-V)
print_version
exit 0
;;
esac
# Line-buffered stdout/stderr so redirected logs (tee/host-agent) flush each line.
if [ "${_TALER_MON_STDBUF:-0}" != "1" ] && command -v stdbuf >/dev/null 2>&1; then
export _TALER_MON_STDBUF=1
@ -61,6 +121,7 @@ Options:
--no-probe do not probe alternate hosts (unknown domains only)
--lang en|fr UI/console language (sticky bar + badges)
overrides auto (FrancPaysan→fr, else en)
--ver, --version, -V print suite version, git commit, and repo URLs
-h, --help
Add a stack: edit domains.conf (name + bank + exchange + merchant + currency).
@ -159,6 +220,7 @@ while [ $# -gt 0 ]; do
i18n_init 2>/dev/null || true
;;
-h|--help) usage; exit 0 ;;
--ver|--version|-V) print_version; exit 0 ;;
-d|--domain)
[ $# -ge 2 ] || { echo "missing arg for $1" >&2; exit 2; }
apply_taler_domain "$2"