blob: 9b6295d5d24a214155fbc5aa20be552a7cc49300 [file] [log] [blame]
Jakub Ružička9e08f962021-04-29 21:31:40 +02001#!/bin/bash
2# create archive from current source using git
3
4VERSION=$(git describe --tags --always)
5# skip "v" from start of version number (if it exists) and replace - with .
6VERSION=${VERSION#v}
7VERSION=${VERSION//[-]/.}
8
9NAMEVER=libyang-$VERSION
10ARCHIVE=$NAMEVER.tar.gz
11
12git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD
Michal Vaskoe4e7d7a2021-10-01 16:34:04 +020013mkdir -p pkg/archives/dev/
14mv $ARCHIVE pkg/archives/dev/
Jakub Ružička9e08f962021-04-29 21:31:40 +020015
16# apkg expects stdout to list archive files
Michal Vaskoe4e7d7a2021-10-01 16:34:04 +020017echo pkg/archives/dev/$ARCHIVE