forked from AlphaGenes/AlphaImpute2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_pipeline.sh
executable file
·47 lines (33 loc) · 998 Bytes
/
build_pipeline.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
command=$1
if [ $# -eq 0 ] ; then
command=none
fi
if [[ ! -f src/alphaimpute2/tinyhouse/Pedigree.py ]] ; then
echo Pedigree.py file not found. Check that the tinyhouse submodule is up to date
exit
fi
# Create python wheel.
rm -r build
rm -r dist
python setup.py bdist_wheel
if [ $command == "install" ] ; then
pip uninstall AlphaImpute2 -y
pip install dist/AlphaImpute2-0.0.3-py3-none-any.whl
fi
#Compile manual
( cd docs; make latexpdf )
target=AlphaImpute2
rm -rf $target
mkdir $target
cp dist/* $target
cp docs/build/latex/AlphaImpute2.pdf $target
cp -r example $target
cp MIT_License.txt $target
version=`git describe --tags --abbrev=0`
commit=`git rev-parse --short HEAD`
date=$(date '+%d-%m-%Y')
rm src/alphaimpute2/version.py
echo version = \"$version\" > src/alphaimpute2/Imputation/version.py
echo commit = \"$commit\" >> src/alphaimpute2/Imputation/version.py
echo date = \"$date\" >> src/alphaimpute2/Imputation/version.py
zip -r $target.zip $target