fd19f76cba
Summary: Build, Packege & Deploy script. Reviewers: teon.banek, mferencevic, mislav.bradac, dgleich Reviewed By: dgleich Subscribers: dgleich, pullbot, buda Differential Revision: https://phabricator.memgraph.io/D397
39 lines
979 B
Bash
Executable File
39 lines
979 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Initial version of script that is going to be used for release builds.
|
|
|
|
echo "Memgraph Release Building..."
|
|
|
|
if [[ $EUID -eq 0 ]]; then
|
|
echo "This script must NOT be run as root!" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
# compile memgraph
|
|
cd ../build
|
|
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`
|
|
|
|
# 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
|
|
rm -rf ../release/${exe_name}/include
|
|
cp -r include ../release/${exe_name}/include
|
|
cp -r template ../release/${exe_name}/template
|
|
cp -r ../config ../release/${exe_name}/config
|
|
cp -r ../libs ../release/${exe_name}/libs
|
|
|
|
# copy the hardcoded query plan
|
|
# TODO: minimise the header files
|
|
cp -r compiled ../release/${exe_name}/
|
|
|
|
echo "Memgraph Release Building DONE"
|