-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpackage-lin.sh
More file actions
executable file
·41 lines (30 loc) · 884 Bytes
/
Copy pathpackage-lin.sh
File metadata and controls
executable file
·41 lines (30 loc) · 884 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
# --- Parse version.cmake ---
MAJOR=$(grep '^set(EMBEDDER_VERSION_MAJOR' version.cmake | sed -E 's/.* ([0-9]+).*/\1/')
MINOR=$(grep '^set(EMBEDDER_VERSION_MINOR' version.cmake | sed -E 's/.* ([0-9]+).*/\1/')
PATCH=$(grep '^set(EMBEDDER_VERSION_PATCH' version.cmake | sed -E 's/.* ([0-9]+).*/\1/')
VER="${MAJOR}.${MINOR}.${PATCH}"
NAME="phenixcode-v${VER}-linux-x64"
EMBEDDER="./"
CLIENT="ui/clients/webview"
DASHBOARD="ui/dashboard/webview"
cd "$EMBEDDER"
./build_rel.sh
echo "FINISHED $EMBEDDER"
cd "$CLIENT"
./build_rel.sh
cd ../../..
cd "$DASHBOARD"
./build_rel.sh
cd ../../..
rm -rf "$NAME"
mkdir "$NAME"
cp -r "$EMBEDDER/dist/"* "$NAME/"
cp -r "$CLIENT/dist/"* "$NAME/"
cp -r "$DASHBOARD/dist/"* "$NAME/"
echo "$NAME.zip..."
rm -f "$NAME.zip"
zip -r "$NAME.zip" "$NAME" >/dev/null
rm -rf "$NAME"
echo "Package '$NAME.zip' ready."