Skip to content

Commit

Permalink
freifunk-version: get ffdd-server 'install_dir' from uci
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Nov 21, 2024
1 parent a5e15eb commit 3c5c9a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash

version="$(head -n3 /srv/ffdd-server/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')"
rev="$(cd /srv/ffdd-server && git describe --all --abbrev=0 | cut -f2 -d"/")"
commit="$(cd /srv/ffdd-server && git show --oneline -s | awk '{print $1}')"
install_dir="$(uci -qX get ffdd.sys.install_dir)"
version="$(head -n3 "$install_dir"/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')"
rev="$(cd "$install_dir" && git describe --all --abbrev=0 | cut -f2 -d"/")"
commit="$(cd "$install_dir" && git show --oneline -s | awk '{print $1}')"

printf '%s - %s (%s)\n' "$version" "$rev" "$commit"

Expand Down

0 comments on commit 3c5c9a3

Please sign in to comment.