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 | |
Michal Vasko | f6a5592 | 2024-03-12 15:36:07 +0100 | [diff] [blame] | 4 | VERSION=$(git log --oneline -n1 --grep="^VERSION" | rev | cut -d' ' -f1 | rev) |
Jakub Ružička | 9e08f96 | 2021-04-29 21:31:40 +0200 | [diff] [blame] | 5 | |
| 6 | NAMEVER=libyang-$VERSION |
| 7 | ARCHIVE=$NAMEVER.tar.gz |
| 8 | |
| 9 | git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD |
Michal Vasko | e4e7d7a | 2021-10-01 16:34:04 +0200 | [diff] [blame] | 10 | mkdir -p pkg/archives/dev/ |
| 11 | mv $ARCHIVE pkg/archives/dev/ |
Jakub Ružička | 9e08f96 | 2021-04-29 21:31:40 +0200 | [diff] [blame] | 12 | |
| 13 | # apkg expects stdout to list archive files |
Michal Vasko | e4e7d7a | 2021-10-01 16:34:04 +0200 | [diff] [blame] | 14 | echo pkg/archives/dev/$ARCHIVE |