blob: ec3f7ae32c3123bfb0b324aefea0b2ac27b5e7ce [file] [log] [blame]
Jakub Ružička9e08f962021-04-29 21:31:40 +02001#!/bin/bash
2# create archive from current source using git
3
4VERSION=$(git describe --tags --always)
5# skip "v" from start of version number (if it exists) and replace - with .
6VERSION=${VERSION#v}
7VERSION=${VERSION//[-]/.}
8
9NAMEVER=libyang-$VERSION
10ARCHIVE=$NAMEVER.tar.gz
11
12git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD
13
14# apkg expects stdout to list archive files
15echo $ARCHIVE