blob: 6cca67c40d9ece5f03b16c69aabb6692c6667223 [file] [log] [blame]
Jakub Ružička9e08f962021-04-29 21:31:40 +02001#!/bin/bash
2# create archive from current source using git
3
Michal Vaskof6a55922024-03-12 15:36:07 +01004VERSION=$(git log --oneline -n1 --grep="^VERSION" | rev | cut -d' ' -f1 | rev)
Jakub Ružička9e08f962021-04-29 21:31:40 +02005
6NAMEVER=libyang-$VERSION
7ARCHIVE=$NAMEVER.tar.gz
8
9git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD
Michal Vaskoe4e7d7a2021-10-01 16:34:04 +020010mkdir -p pkg/archives/dev/
11mv $ARCHIVE pkg/archives/dev/
Jakub Ružička9e08f962021-04-29 21:31:40 +020012
13# apkg expects stdout to list archive files
Michal Vaskoe4e7d7a2021-10-01 16:34:04 +020014echo pkg/archives/dev/$ARCHIVE