Jakub Ružička | 891b73a | 2021-07-14 17:26:48 +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=libnetconf2-$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 |