This repository was archived by the owner on Oct 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCraft.sh
More file actions
executable file
·55 lines (46 loc) · 1.65 KB
/
Craft.sh
File metadata and controls
executable file
·55 lines (46 loc) · 1.65 KB
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
47
48
49
50
51
52
53
54
55
#!/bin/env zsh
# Read the available environment paths which include (for example) Homebrew.
for f in /etc/paths.d/*; do
while read -r line; do
export PATH="$PATH:$line"
done < "$f"
done
if [ -f "~/.zprofile" ]; then
echo "Sourcing ~/.zprofile to include possible PATH definitions..."
source "~/.zprofile"
fi
if [ -z "${CODE_SIGN_IDENTITY}" ]; then
echo "Error: CODE_SIGN_IDENTITY is not defined or is empty!"
exit 1
fi
DESKTOP_CLIENT_PROJECT_ROOT="$SOURCE_ROOT/Upstream"
if [ ! -d "$DESKTOP_CLIENT_PROJECT_ROOT" ]; then
echo "Desktop client project root does not exist. Cloning repository..."
cd "$SOURCE_ROOT"
git clone --branch=master --quiet https://github.com/nextcloud/desktop.git Upstream
if [ $? -ne 0 ]; then
echo "Error: Failed to clone the Nextcloud desktop client repository!"
exit 1
else
echo "Successfully cloned the Nextcloud desktop client repository."
fi
fi
if [ -d "$DESKTOP_CLIENT_PROJECT_ROOT/admin/osx/mac-crafter" ]; then
cd "$DESKTOP_CLIENT_PROJECT_ROOT/admin/osx/mac-crafter"
else
echo "Error: Directory '$DESKTOP_CLIENT_PROJECT_ROOT/admin/osx/mac-crafter' does not exist!"
exit 1
fi
echo "Desktop client project root: $DESKTOP_CLIENT_PROJECT_ROOT"
echo "Build path: $DERIVED_SOURCES_DIR"
echo "Product path: $SOURCE_ROOT/Build"
echo "Code sign identity: $CODE_SIGN_IDENTITY"
swift run mac-crafter \
--build-path="$DERIVED_SOURCES_DIR" \
--product-path="/Applications" \
--build-type="Debug" \
--dev \
--disable-auto-updater \
--build-file-provider-module \
--code-sign-identity="$CODE_SIGN_IDENTITY" \
"$DESKTOP_CLIENT_PROJECT_ROOT"