summaryrefslogtreecommitdiffstats
path: root/distro/scripts/upstream-version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'distro/scripts/upstream-version.sh')
-rwxr-xr-xdistro/scripts/upstream-version.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/distro/scripts/upstream-version.sh b/distro/scripts/upstream-version.sh
new file mode 100755
index 0000000..4489c8e
--- /dev/null
+++ b/distro/scripts/upstream-version.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# get latest upstream libyang version from github
+
+RLS_URL=https://api.github.com/repos/CESNET/libyang/releases
+VERSION=$(curl -s $RLS_URL | grep tag_name | cut -d '"' -f 4 | sort --version-sort | tail -n 1)
+VERSION=${VERSION#v}
+echo $VERSION