cmctl icon indicating copy to clipboard operation
cmctl copied to clipboard

FYI: I submitted a package to the Scoop package manager for Windows.

Open sharpjs opened this issue 1 year ago • 3 comments
trafficstars

This is more of a FYI than an issue. I wanted an easy way to install cmctl on Windows and keep it up to date, so I submitted a package manifest to the Scoop package manager's main bucket.

The PR is here: https://github.com/ScoopInstaller/Main/pull/5711

If the PR is accepted, then installation on Windows becomes as easy as scoop install cmctl.

Maintaining such a Scoop package is easy. Bumping the version and hashes for a program like cmctl requires only a single command and a PR. Anyone can do it; I intend to do so if nobody else does.

sharpjs avatar Apr 13 '24 23:04 sharpjs

Thanks for doing this @sharpjs, we use goreleaser to publish cmctl, so maybe it can be automated through that tool?

inteon avatar Apr 24 '24 18:04 inteon

Quite possibly. I'm not familiar with Go tools at all, but I'd be happy to go though the process and distill it into a list of commands for an automation tool to do. For now, I understand the high-level process to be:

  • Clone repo with package manifest.
  • Run command to update download URL and hashes from SBOM file.
  • Submit PR.

Edit: Looks like Scoop provides an auto-pr.ps1 (PowerShell) script to combine the bottom two steps.

NAME
    $HOME\scoop\apps\scoop\current\bin\auto-pr.ps1

SYNOPSIS
    Updates manifests and pushes them or creates pull-requests.


SYNTAX
    $HOME\scoop\apps\scoop\current\bin\auto-pr.ps1
      [-Upstream] <String> [[-OriginBranch] <String>] [[-App] <String>]
      [[-CommitMessageFormat] <String>] [[-Dir] <String>] [-Push]
      [-Request] [-Help] [[-SpecialSnowflakes] <String[]>] [-SkipUpdated]
      [-ThrowError] [<CommonParameters>]

sharpjs avatar Apr 24 '24 19:04 sharpjs

Ok, no problem. We can probably start by doing it manually, this was the setup I was thinking about: https://goreleaser.com/customization/scoop/. Not sure how valuable/ easy it is to set up.

inteon avatar Apr 24 '24 19:04 inteon

I saw a notification today for v2.1.0-alpha.0. FYI, I'll be on vacation from today (June 10th) through 17th, without access to a computer. Just FYI, if the 2.1.0 release happens during that time, I won't update the Scoop PR until the 18th at the earliest. Then again, there seems to be surprisingly little movement on that PR, so I'm not sure a few days' delay would matter.

sharpjs avatar Jun 10 '24 15:06 sharpjs

Since I already have a PR open, I just used the following commands:

Updating the manifest in my existing scoop PR:

image

Testing the updated manifest:

image

...followed by a git push and updating the PR title/text.

sharpjs avatar Jun 23 '24 18:06 sharpjs

I also created issue https://github.com/ScoopInstaller/Main/issues/5942 corresponding to the PR.

sharpjs avatar Jun 23 '24 18:06 sharpjs

The Scoop PR was merged. A Scoop maintainer changed the method of hash retrieval from JsonPath-on-SBOM to checksums.txt.

sharpjs avatar Jun 25 '24 19:06 sharpjs