From 387bf3b8730cc319a58ba56d060f87fc56577de0 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 25 Jul 2012 09:31:44 +0200 Subject: [PATCH] Generate git tarball of e2factory during release Signed-off-by: Tobias Ulmer --- release.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 45d458d..fa38103 100755 --- a/release.sh +++ b/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e #E=echo E="" @@ -34,3 +34,20 @@ $E git commit -s -m "create next changelog entry" Changelog $E git archive --format=tar --prefix=$TAG/ refs/tags/$TAG |gzip >$TAG.tar.gz sha1sum $TAG.tar.gz >$TAG.tar.gz.sha1 + + +if [ -z "$TAG" ]; then + echo "TAG not set" + exit 1 +fi +rm -rf "$TAG.git" +git init --bare "$TAG.git" +pushd "$TAG.git" +git fetch .. tag "$TAG" + cp FETCH_HEAD HEAD # same effect as git reset --hard FETCH_HEAD +git gc --aggressive --prune=now +popd + +tar czf "$TAG.git.tar.gz" "$TAG.git" +rm -rf "$TAG.git" +sha1sum "$TAG.git.tar.gz" > "$TAG.git.tar.gz.sha1" -- 2.39.5