Epple-II/bin/build.sh
Christopher A. Mosher 58f9575823 minor fixes
2024-04-13 17:45:58 -04:00

34 lines
516 B
Bash
Executable File

#!/bin/sh
set -e
if [ -e "$1/CMakeCache.txt" ] ; then
builddir="$1"
shift
else
mkdir -p tmp
builddir=$(mktemp -d tmp/tmp.XXXXXXXXXX)
fi
cd $builddir
# TODO: fix version number
if [ "$GITHUB_ENV" != "" ] ; then
echo "git_tag=2.0.0-$(date +%Y%m%d.%H%M%S)" >>$GITHUB_ENV
fi
echo "::group::cmake"
cmake ../..
echo "::endgroup::"
echo "::group::cmake --build"
cmake --build .
echo "::endgroup::"
if [ "$1" = "-n" ] ; then
exit 0
fi
echo "::group::cpack"
cpack -B ../cpack/
echo "::endgroup::"