Skip to content

[stable32] fix(appstore): copy dist only if directory exists#7423

Merged
vitormattos merged 1 commit intostable32from
fix/appstore-dist-stable32
Apr 6, 2026
Merged

[stable32] fix(appstore): copy dist only if directory exists#7423
vitormattos merged 1 commit intostable32from
fix/appstore-dist-stable32

Conversation

@vitormattos
Copy link
Copy Markdown
Member

Problem

The appstore Makefile target unconditionally copies the dist/ directory:

cp -r \
    appinfo \
    css \
    dist \   ← fails if 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 both the v12.4.1 and v13.2.1 release workflows to fail.

Fix

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

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

Notes

  • No PHP/template code references dist/
  • The pdf worker is now served from js/ (Vite output)
  • verify-appstore-package already uses this exact conditional pattern

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 Patch (32) milestone Apr 6, 2026
@vitormattos vitormattos merged commit 1e7714f into stable32 Apr 6, 2026
3 checks passed
@vitormattos vitormattos deleted the fix/appstore-dist-stable32 branch April 6, 2026 00:25
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Apr 6, 2026
@vitormattos vitormattos changed the title fix(appstore): copy dist only if directory exists [stable32] fix(appstore): copy dist only if directory exists 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