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 |
Michal Vasko | 4c8b93d | 2021-10-01 16:16:12 +0200 | [diff] [blame] | 13 | mkdir -p pkg/archives/dev/ |
| 14 | mv $ARCHIVE pkg/archives/dev/ |
Jakub Ružička | 891b73a | 2021-07-14 17:26:48 +0200 | [diff] [blame] | 15 | |
| 16 | # apkg expects stdout to list archive files |
Michal Vasko | 4c8b93d | 2021-10-01 16:16:12 +0200 | [diff] [blame] | 17 | echo pkg/archives/dev/$ARCHIVE |