Skip to content
Snippets Groups Projects
Commit 5c0d45f7 authored by Stephan Schulz's avatar Stephan Schulz
Browse files

add tarball script

parent b8f4f0a5
Branches
Tags
No related merge requests found
#!/bin/bash
set -x
GITCOM=$(git describe --tags)
if [[ $? -ne 0 ]]
then
GITCOM=$(git rev-parse --short --verify HEAD)
if [[ $? -ne 0 ]]
then
echo "GIT ERROR... ($GITCOM)"
echo "Need git to work"
exit 1
fi
fi
echo "Creating tarball for release: $GITCOM"
TARNAME=all-$GITCOM
git archive --prefix=$TARNAME/ -o $TARNAME.tar $GITCOM
mkdir ${TARNAME}_build
cmake -S . -B ${TARNAME}_build -DCM_ALL_AUTO_DOC=ON -DCMAKE_INSTALL_PREFIX=$(pwd)/${TARNAME}_install
cmake --build ${TARNAME}_build
cmake --install ${TARNAME}_build
MAINPATH=$(pwd)
mkdir -p $TARNAME/Documentation
cd $TARNAME/Documentation
mkdir Doxygen
cd Doxygen
rsync -r "$MAINPATH/${TARNAME}_install/share/doc/ALL/html/" .
cd ..
mkdir Sphinx
cd Sphinx
rsync -r "$MAINPATH/${TARNAME}_install/share/doc/ALL/sphinx/" .
cd ..
cd ../..
tar cf tmp.tar $TARNAME
tar --concatenate --file=$TARNAME.tar tmp.tar
rm -f tmp.tar
rm -rf ${TARNAME}_build ${TARNAME}_install ${TARNAME}
bzip2 -f $TARNAME.tar
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment