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