casperdcl / cli

GitHub’s official command line tool

Home Page:https://cli.github.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibly unneeded code maintenance.

ciscorucinski opened this issue · comments

Do you need to include all the other source code besides what Snap needs? Can't you get rid of everything and link the source code via URL in the yaml file? This repo is just for the snap, right?

Additional context

The Android Studio Snap is a good example of this as it grabs the latest url. The repo is really small and only deals with the snap.

  1. the original intention was this fork to be a PR into the upstream repo
    • they've indicated they may still merge it at some point in the future
  2. the code is also automatically rebased onto the latest upstream version daily so stays up-to-date (minor versioning bug in #3 is fixed now)

FYI for future ref, the approach in https://github.com/snapcrafters/android-studio/blob/1ec5cf5b3e19ca490b5529b162083cb4de15d8a1/get_latest.py and https://github.com/snapcrafters/android-studio/blob/1ec5cf5b3e19ca490b5529b162083cb4de15d8a1/snap/snapcraft.yaml#L32-L36 can be implemented here simply as:

curl -LO $(
  gh api 'repos/cli/cli/releases?per_page=1' |
  jq -r '.[].assets[].browser_download_url' |
  grep -E '.*linux.*amd64.*\.tar\.gz$')