Skip to content

Adds --screenshots argument to pebble publish --non-interactive command#50

Merged
ericmigi merged 3 commits intocoredevices:mainfrom
adrienthiery:feat/publish-local-screenshots
Apr 13, 2026
Merged

Adds --screenshots argument to pebble publish --non-interactive command#50
ericmigi merged 3 commits intocoredevices:mainfrom
adrienthiery:feat/publish-local-screenshots

Conversation

@adrienthiery
Copy link
Copy Markdown

@adrienthiery adrienthiery commented Apr 10, 2026

Summary

  • Adds --screenshots FILE [FILE ...] argument to pebble publish
  • In --non-interactive mode, accepts local screenshot/GIF files instead of requiring a running
    emulator
  • Filenames must start with the platform name (e.g. emery_screenshot.png) to match the existing upload
    convention

Usage

  pebble publish --non-interactive \
    --description "My watchface" \
    --no-gif-all-platforms \
    --screenshots emery_screenshot.png basalt_screenshot.png emery_preview.gif

adrienthiery and others added 2 commits April 10, 2026 14:40
In --non-interactive mode, screenshots can only come from the emulator.
This adds a --screenshots flag that accepts local file paths, allowing
CI/CD pipelines and scripted workflows to supply pre-existing screenshots
or GIFs without needing a running emulator.

Filenames must start with the platform name (e.g. emery_screenshot.png)
so the upload can infer the target platform, matching the convention
already used by the auto-capture path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@adrienthiery adrienthiery changed the title Feat/publish local screenshots Adds --screenshots argument to pebble publish command Apr 10, 2026
@adrienthiery adrienthiery changed the title Adds --screenshots argument to pebble publish command Adds --screenshots argument to pebble publish --non-interactive command Apr 10, 2026
Copy link
Copy Markdown

@ericmigi ericmigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition! One small suggestion: the interactive path in _prompt_local_screenshot_files checks os.path.exists(path) before accepting each file, which gives the user a clear early error. The new --screenshots path skips that, so a typo in a filename won't surface until _append_capture_files tries to open() it during upload — by which point the error message is less obvious.

Maybe worth adding a quick existence check before the split:

local_files = getattr(args, "screenshots", None) or []
if local_files:
    for p in local_files:
        if not os.path.exists(p):
            raise ToolError("Screenshot file not found: {}".format(p))
    gif_paths = [p for p in local_files if p.lower().endswith(".gif")]
    screenshot_paths = [p for p in local_files if not p.lower().endswith(".gif")]

@ericmigi
Copy link
Copy Markdown

thanks!

@ericmigi ericmigi merged commit 5ee158b into coredevices:main Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants