diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:55:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:55:11 +0000 |
commit | cd07912073c951b4bbb871ed2653af1be2cfc714 (patch) | |
tree | 1073c2308492e6aea4c66cb7436ee92db2abfd42 /distro/scripts | |
parent | Initial commit. (diff) | |
download | libyang2-upstream.tar.xz libyang2-upstream.zip |
Adding upstream version 2.1.30.upstream/2.1.30upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | distro/scripts/make-archive.sh | 17 | ||||
-rwxr-xr-x | distro/scripts/upstream-version.sh | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/distro/scripts/make-archive.sh b/distro/scripts/make-archive.sh new file mode 100755 index 0000000..9b6295d --- /dev/null +++ b/distro/scripts/make-archive.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# create archive from current source using git + +VERSION=$(git describe --tags --always) +# skip "v" from start of version number (if it exists) and replace - with . +VERSION=${VERSION#v} +VERSION=${VERSION//[-]/.} + +NAMEVER=libyang-$VERSION +ARCHIVE=$NAMEVER.tar.gz + +git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD +mkdir -p pkg/archives/dev/ +mv $ARCHIVE pkg/archives/dev/ + +# apkg expects stdout to list archive files +echo pkg/archives/dev/$ARCHIVE 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 |