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 |
Michal Vasko | e4e7d7a | 2021-10-01 16:34:04 +0200 | [diff] [blame^] | 13 | mkdir -p pkg/archives/dev/ |
| 14 | mv $ARCHIVE pkg/archives/dev/ |
Jakub Ružička | 9e08f96 | 2021-04-29 21:31:40 +0200 | [diff] [blame] | 15 | |
| 16 | # apkg expects stdout to list archive files |
Michal Vasko | e4e7d7a | 2021-10-01 16:34:04 +0200 | [diff] [blame^] | 17 | echo pkg/archives/dev/$ARCHIVE |