joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.47k stars 424 forks source link

Add snapcraft.yaml #305

Open alexmurray opened 5 years ago

alexmurray commented 5 years ago

It would be great if there was an official grip snap available in the snapcraft.io store - so this PR adds a snapcraft.yaml so that a corresponding snap package can be automatically built and published in the snapcraft.io store via the build.snapcraft.io service.

joeyespo commented 5 years ago

Hey @alexmurray! Thanks for introducing Grip to this app store.

The concept is great. However, I'm hesitant to add specific files like this since there's potentially a lot of app stores out there - each one adding more and more noise to this repo.

Would you know if there's any way to register to Snapcraft without the yaml file?

alexmurray commented 5 years ago

Sure, the easiest way would be to create a separate repository that just contains the snapcraft build recipe which then points to the main git repo as the source - so you could create a new repo https://github.com/joeyespo/grip-snap which just has something like the following snapcraft.yaml recipe - and then register this new repo via the build.snapcraft.io service to publish grip snaps to the store.

name: grip
base: core18 # the base snap is the execution environment for this snap
version: 4.5.2
summary: GitHub Readme Instant Preview
description: |
  Render local readme files before sending off to GitHub.

  Grip is a command-line server application written in Python that uses the
  GitHub markdown API to render a local readme file. The styles and
  rendering come directly from GitHub, so you'll know exactly how it will
  appear. Changes you make to the Readme will be instantly reflected in the
  browser without requiring a page refresh.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

parts:
  grip:
    # See 'snapcraft plugins'
    python-version: python3
    plugin: python
    source-type: git
    source: https://github.com/joeyespo/grip

apps:
  grip:
    command: bin/grip
    plugs:
      - home
      - network-bind
      - desktop # so can launch browser