Skip to content

Commit 04f435f

Browse files
committed
fix: build setup
1 parent 3121151 commit 04f435f

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.github/workflows/main-release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,14 @@ jobs:
499499
restore-keys: |
500500
${{ runner.os }}-${{ matrix.build_name }}-build-
501501
502-
- name: Cache JRE for Tabula
503-
uses: actions/cache@v4
504-
with:
505-
path: |
506-
src-tauri/resources/build-jre
507-
key: ${{ runner.os }}-${{ matrix.target }}-jre-build-${{ hashFiles('src-tauri/scripts/setup-build-jre.sh') }}
508-
restore-keys: |
509-
${{ runner.os }}-${{ matrix.target }}-jre-build-
502+
- name: Cache JRE for Tabula
503+
uses: actions/cache@v4
504+
with:
505+
path: |
506+
src-tauri/resources/build-jre
507+
key: ${{ runner.os }}-${{ matrix.target }}-jre-build-v2-${{ hashFiles('src-tauri/scripts/setup-build-jre.sh') }}
508+
restore-keys: |
509+
${{ runner.os }}-${{ matrix.target }}-jre-build-v2-
510510
511511
- name: Install frontend dependencies
512512
run: pnpm install --frozen-lockfile

src-tauri/scripts/setup-build-jre.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ download_jre() {
177177
# Clean up archive
178178
rm "$ARCHIVE_FILE"
179179

180-
chmod -R u+r "$EXTRACT_DIR" 2>/dev/null || true
181-
chmod -R a+r "$EXTRACT_DIR" 2>/dev/null || true
180+
find "$EXTRACT_DIR" -type f -exec chmod u+r {} \; 2>/dev/null || true
181+
find "$EXTRACT_DIR" -type f -exec chmod a+r {} \; 2>/dev/null || true
182182
find "$EXTRACT_DIR" -type d -exec chmod u+rx {} \; 2>/dev/null || true
183183
find "$EXTRACT_DIR" -type d -exec chmod a+rx {} \; 2>/dev/null || true
184184

@@ -238,8 +238,9 @@ create_minimal_jre() {
238238
--output "$OUTPUT_DIR" 2>&1 | grep -v "Warning" || [ ${PIPESTATUS[0]} -eq 0 ]; then
239239

240240
if [ -d "$OUTPUT_DIR" ]; then
241-
chmod -R u+r "$OUTPUT_DIR" 2>/dev/null || true
242-
chmod -R a+r "$OUTPUT_DIR" 2>/dev/null || true
241+
# Set permissions explicitly on all files and directories
242+
find "$OUTPUT_DIR" -type f -exec chmod u+r {} \; 2>/dev/null || true
243+
find "$OUTPUT_DIR" -type f -exec chmod a+r {} \; 2>/dev/null || true
243244
find "$OUTPUT_DIR" -type d -exec chmod u+rx {} \; 2>/dev/null || true
244245
find "$OUTPUT_DIR" -type d -exec chmod a+rx {} \; 2>/dev/null || true
245246

@@ -262,9 +263,9 @@ copy_full_jre() {
262263

263264
cp -r "$SOURCE_JRE" "$OUTPUT_DIR"
264265

265-
# Fix permissions after copying
266-
chmod -R u+r "$OUTPUT_DIR" 2>/dev/null || true
267-
chmod -R a+r "$OUTPUT_DIR" 2>/dev/null || true
266+
# Fix permissions after copying - set explicitly on all files and directories
267+
find "$OUTPUT_DIR" -type f -exec chmod u+r {} \; 2>/dev/null || true
268+
find "$OUTPUT_DIR" -type f -exec chmod a+r {} \; 2>/dev/null || true
268269
find "$OUTPUT_DIR" -type d -exec chmod u+rx {} \; 2>/dev/null || true
269270
find "$OUTPUT_DIR" -type d -exec chmod a+rx {} \; 2>/dev/null || true
270271

@@ -279,9 +280,8 @@ set_java_permissions() {
279280
print_info "Setting permissions on JRE files..." >&2
280281

281282
# First, ensure all files and directories are readable
282-
# This is critical for Tauri's build process which checks file changes
283-
chmod -R u+r "$JRE_PATH" 2>/dev/null || true
284-
chmod -R a+r "$JRE_PATH" 2>/dev/null || true
283+
find "$JRE_PATH" -type f -exec chmod u+r {} \; 2>/dev/null || true
284+
find "$JRE_PATH" -type f -exec chmod a+r {} \; 2>/dev/null || true
285285
find "$JRE_PATH" -type d -exec chmod u+rx {} \; 2>/dev/null || true
286286
find "$JRE_PATH" -type d -exec chmod a+rx {} \; 2>/dev/null || true
287287

0 commit comments

Comments
 (0)