File: make-archive.sh

package info (click to toggle)
libyang2 2.1.30-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,644 kB
  • sloc: ansic: 111,444; sh: 472; xml: 394; exp: 109; makefile: 15
file content (17 lines) | stat: -rwxr-xr-x 474 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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