blob: d51884528cc2d207babcba516cf9a7cdbad358e8 [file] [log] [blame]
Jakub Ružička891b73a2021-07-14 17:26:48 +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=libnetconf2-$VERSION
10ARCHIVE=$NAMEVER.tar.gz
11
12git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD
Michal Vasko4c8b93d2021-10-01 16:16:12 +020013mkdir -p pkg/archives/dev/
14mv $ARCHIVE pkg/archives/dev/
Jakub Ružička891b73a2021-07-14 17:26:48 +020015
16# apkg expects stdout to list archive files
Michal Vasko4c8b93d2021-10-01 16:16:12 +020017echo pkg/archives/dev/$ARCHIVE