2016-08-15 01:49:56 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-02-28 23:50:50 +08:00
|
|
|
# Initial version of script that is going to be used for release builds.
|
2016-08-15 01:49:56 +08:00
|
|
|
|
|
|
|
echo "Memgraph Release Building..."
|
|
|
|
|
2017-05-31 16:26:53 +08:00
|
|
|
if [[ $EUID -eq 0 ]]; then
|
|
|
|
echo "This script must NOT be run as root!" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-08-15 01:49:56 +08:00
|
|
|
# compile memgraph
|
|
|
|
cd ../build
|
2017-02-28 23:50:50 +08:00
|
|
|
rm -rf ./*
|
|
|
|
cmake -DCMAKE_BUILD_TYPE:String=debug ..
|
|
|
|
make -j8
|
|
|
|
make copy_hardcoded_queries
|
|
|
|
|
|
|
|
# get the most recent version of memgraph exe
|
|
|
|
exe_name=`ls -t memgraph_* | head -1`
|
2016-08-15 01:49:56 +08:00
|
|
|
|
|
|
|
# create dst directory
|
|
|
|
mkdir -p ../release/${exe_name}
|
|
|
|
|
|
|
|
# copy all relevant files
|
|
|
|
cp ${exe_name} ../release/${exe_name}/memgraph
|
|
|
|
cp libmemgraph_pic.a ../release/${exe_name}/libmemgraph_pic.a
|
2016-12-14 17:27:41 +08:00
|
|
|
rm -rf ../release/${exe_name}/include
|
2016-08-15 01:49:56 +08:00
|
|
|
cp -r include ../release/${exe_name}/include
|
|
|
|
cp -r template ../release/${exe_name}/template
|
2016-11-04 19:05:35 +08:00
|
|
|
cp -r ../config ../release/${exe_name}/config
|
2017-02-28 23:50:50 +08:00
|
|
|
cp -r ../libs ../release/${exe_name}/libs
|
2016-11-04 19:05:35 +08:00
|
|
|
|
2017-02-28 23:50:50 +08:00
|
|
|
# copy the hardcoded query plan
|
|
|
|
# TODO: minimise the header files
|
|
|
|
cp -r compiled ../release/${exe_name}/
|
2016-08-15 01:49:56 +08:00
|
|
|
|
|
|
|
echo "Memgraph Release Building DONE"
|