generated from Zheng-Bote/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo_compile.sh
executable file
·43 lines (30 loc) · 1.16 KB
/
do_compile.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
#!/usr/bin/bash
#TARGET="Debug"
TARGET="Release"
BINARY="db_deploy"
VERSION="1.0.0"
cd build
echo "compile ${TARGET} mode"
cmake -B . -S ../src -DCMAKE_BUILD_TYPE=${TARGET}
cmake --build . --parallel 6
if [[ $TARGET == "Release" ]]; then
#echo "create AppImage"
#mkdir -p ./Packaging/AppDir/usr/bin/
#cp ${BINARY} ./Packaging/AppDir/usr/bin/.
#./linuxdeploy-plugin-appimage-x86_64.appimage --appdir ./Packaging/AppDir
#sha256sum ${BINARY}-x86_64.AppImage > ${BINARY}-x86_64.AppImage.sha256sum
echo "copy binary to Packaging"
mkdir ./Packaging
cp ${BINARY} ./Packaging/.
cp ${BINARY}.sha256sum ./Packaging/.
echo "create SBoM"
cd ..
nvm use --lts
/home/zb_bamboo/Downloads/bin/atom -J-Xmx16g usages -o app.atom --slice-outfile ./build/Packaging/atom_usages_v${VERSION}.json -l cpp ./src
cdxgen -o ./build/Packaging/sbom_v${VERSION}.json -t cpp --usages-slices-file ./build/Packaging/atom_usages_v${VERSION}.json --author "ZHENG Robert" --deep -r ./src
cd ./build/Packaging
sha256sum sbom_v${VERSION}.json > sbom_v${VERSION}.json.sha256sum
fi
echo "Done $TARGET"
#./crow_web static/crow_web.ini
#clear