Skip to content
Snippets Groups Projects
Commit cf690990 authored by Sophie Hourihane's avatar Sophie Hourihane
Browse files

Merge branch 'dist.sh' into 'master'

Add dist.sh script to trivialise making a clean tarball

See merge request lscsoft/bayeswave!258
parents d7f955d5 213634f0
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,9 @@ BayesWaveToLALPSD
src/version.h
src/bayeswave.pc
# dist dir
dist/
# autotools stuff
.libs/
.deps/
......
......@@ -56,6 +56,7 @@ set(CPACK_SOURCE_IGNORE_FILES
"\\\\.svn/"
"\\\\.git"
"build/"
"dist/"
"CMakeFiles/"
"CMakeCache.txt"
"_CPack_Packages/"
......
dist.sh 0 → 100755
#!/bin/bash
#
# Script to build a source distribution for BayesWave
# based on a git reference (ideally a tag).
#
# Author: Duncan Macleod <duncan.macleod@ligo.org>
#
set -e
# get the TAG from the command-line arguments
TAG=$1
shift 1 || {
echo "Please include tag to build."; 1>&2
echo; 1>&2
echo "usage: bash dist.sh {TAG}"; 1>&2
exit 1;
}
# NOTE: all other arguments are passed to the
# CMake configure command
# clone the project into a temporary directory, to ensure a clean copy
_TMPDIR="$(mktemp -d)"
trap "rm -rf ${_TMPDIR}" EXIT
GIT_URL="https://git.ligo.org/lscsoft/bayeswave.git"
git clone \
--quiet \
--depth 1 \
--branch "${TAG}" \
${GIT_URL} \
"${_TMPDIR}" \
;
# build the tarball in a clean subdirectory
rm -rf dist
mkdir -p dist
cd dist
cmake \
"${_TMPDIR}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
"$@" \
;
cmake \
--build . \
--target package_source \
--verbose \
;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment