-
-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathprepare-release.sh
More file actions
executable file
·56 lines (44 loc) · 1.76 KB
/
Copy pathprepare-release.sh
File metadata and controls
executable file
·56 lines (44 loc) · 1.76 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
56
#!/bin/bash
# Script to prepare release files from build artifacts
# This script handles CLI, DX11, and OpenGL builds, creating releases even if some fail
set -euo pipefail
ARTIFACTS_DIR="artifacts"
RELEASE_DIR="release"
# Create release directory
mkdir -p "$RELEASE_DIR"
# Check if CLI build exists
if [ -f "$ARTIFACTS_DIR/cli-release/cli.exe" ]; then
echo "Found CLI build, adding to release..."
mv "$ARTIFACTS_DIR/cli-release/cli.exe" "$ARTIFACTS_DIR/cli-release/zed.exe"
fi
# Check if DX11 build exists
if [ -f "$ARTIFACTS_DIR/editor-dx11-release/zed.exe" ]; then
echo "Found DX11 build, adding to release..."
mkdir -p "$ARTIFACTS_DIR/editor-dx11-release/zed/bin"
mv "$ARTIFACTS_DIR/editor-dx11-release/zed.exe" "$ARTIFACTS_DIR/editor-dx11-release/zed"
cp "$ARTIFACTS_DIR/cli-release/zed.exe" "$ARTIFACTS_DIR/editor-dx11-release/zed/bin"
cd "$ARTIFACTS_DIR/editor-dx11-release"
zip -r "../../$RELEASE_DIR/zed.zip" -9 "zed/"
cd -
fi
# Check if OpenGL build exists
if [ -f "$ARTIFACTS_DIR/editor-opengl-release/zed.exe" ]; then
echo "Found OpenGL build, adding to release..."
mkdir -p "$ARTIFACTS_DIR/editor-opengl-release/zed/bin"
mv "$ARTIFACTS_DIR/editor-opengl-release/zed.exe" "$ARTIFACTS_DIR/editor-opengl-release/zed"
cp "$ARTIFACTS_DIR/cli-release/zed.exe" "$ARTIFACTS_DIR/editor-opengl-release/zed/bin"
cd "$ARTIFACTS_DIR/editor-opengl-release"
zip -r "../../$RELEASE_DIR/zed-opengl.zip" -9 "zed/"
cd -
fi
# Generate checksums for existing files in release folder
cd "$RELEASE_DIR"
if ls * >/dev/null 2>&1; then
echo "Generating checksums..."
sha256sum * > sha256sums.txt
echo "Release files prepared successfully:"
ls -la
else
echo "Error: No release files found in release folder"
exit 1
fi