Skip to content

fix(appstore): copy dist only if directory exists#7425

Merged
vitormattos merged 1 commit intomainfrom
fix/appstore-dist-main
Apr 6, 2026
Merged

fix(appstore): copy dist only if directory exists#7425
vitormattos merged 1 commit intomainfrom
fix/appstore-dist-main

Conversation

@vitormattos
Copy link
Copy Markdown
Member

Problem

The appstore Makefile target unconditionally copies the dist/ directory:

cp -r \
    appinfo \
    css \
    dist \   ← fails when absent
    js \
    ...

The GitHub Actions release workflow runs npm run build (via Vite + @nextcloud/vite-config), which outputs the pdf worker to js/ — not dist/. Since dist/ is not created by the build in CI, make appstore fails with:

cp: cannot stat 'dist': No such file or directory

This caused the v12.4.1 and v13.2.1 release workflows to fail (fixed on stable32/stable33 via PRs #7423 and #7424).

Fix

Remove dist from the unconditional cp -r and add a conditional guard (identical to what verify-appstore-package already does):

if [ -d dist ]; then \
    cp -r dist $(appstore_sign_dir)/$(app_name)/; \
fi

Consistent with the existing conditional in verify-appstore-package.

The dist/ directory is not always produced by the frontend build
(e.g. in the GitHub Actions release workflow where vite outputs the
pdf worker to js/ instead). Make the copy conditional, consistent
with the verify-appstore-package target which already uses an
if [ -d dist ] guard.

[skip ci]

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos added the bug Something isn't working label Apr 6, 2026
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Apr 6, 2026
@vitormattos vitormattos added this to the Next Major (34) milestone Apr 6, 2026
@vitormattos vitormattos merged commit 78ac351 into main Apr 6, 2026
6 checks passed
@vitormattos vitormattos deleted the fix/appstore-dist-main branch April 6, 2026 00:40
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

1 participant