name: hacs-snap
base: core20
version: '1.3.3' 
summary: Home Assistant Community Store 
description: |
  Manage (Install, track, upgrade) and discover custom elements for Home Assistant directly from the UI.

  What?
  HACS is a integration that gives the user a powerful UI to handle downloads of custom integrations and plugins.

  Highlights of what HACS can do:

    - Help you discover new custom elements.
    - Help you install (download) new custom elements.
    - Help you keep track of your custom elements.
    - Manage(Install/Upgrade/Remove)
    - Shortcuts to repositories/issue tracker

grade: devel
confinement: strict

plugs:
  lib-hacs:
    interface: content
    content: lib-hacs
    target: $SNAP_DATA/custom_components
    default-provider: home-assistant-snap

hooks:
  install:
    plugs: [lib-hacs]
  remove:
    plugs: [lib-hacs]

parts:
  hacs:
    plugin: dump
    source: https://github.com/hacs/integration.git
    source-tag: ${SNAPCRAFT_PROJECT_VERSION}
    organize:
      custom_components/hacs: hacs
    stage:
      - hacs
  configure-hooks:
    plugin: dump
    source: hooks
    organize:
      install.sh: snap/hooks/post-refresh
      uninstall.sh: snap/hooks/remove