Skip to content

Commit b99d4db

Browse files
committed
Release script.
1 parent ec63014 commit b99d4db

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

scripts/make_release_tarball.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
###############################################################################
4+
# Copyright (c) 2014-23, Lawrence Livermore National Security, LLC
5+
# and Kripke project contributors. See the Kripke/COPYRIGHT file for details.
6+
#
7+
# SPDX-License-Identifier: (BSD-3-Clause)
8+
###############################################################################
9+
10+
TAR_CMD=`which tar`
11+
VERSION=`git describe --tags`
12+
SHORTHASH=`git rev-parse --short HEAD`
13+
14+
git archive --prefix=kripke-${VERSION}-${SHORTHASH}/ -o kripke-${VERSION}-${SHORTHASH}.tar HEAD 2> /dev/null
15+
16+
echo "Running git archive submodules..."
17+
18+
p=`pwd` && (echo .; git submodule foreach --recursive) | while read entering path; do
19+
temp="${path%\'}";
20+
temp="${temp#\'}";
21+
path=$temp;
22+
[ "$path" = "" ] && continue;
23+
(cd $path && git archive --prefix=kripke-${VERSION}-${SHORTHASH}/$path/ HEAD > $p/tmp.tar && ${TAR_CMD} --concatenate --file=$p/kripke-${VERSION}-${SHORTHASH}.tar $p/tmp.tar && rm $p/tmp.tar);
24+
done
25+
26+
gzip kripke-${VERSION}-${SHORTHASH}.tar

0 commit comments

Comments
 (0)