arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

snap

Open mikeroyal opened this issue 6 years ago • 12 comments
trafficstars

Includes a snapcraft.yaml to build snap. I still need to make some changes to the snap configuration but here's what i have so far.

Prep

sudo snap install snapcraft --classic sudo snap install multipass --beta --classic

mikeroyal avatar Jul 16 '19 07:07 mikeroyal

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 16 '19 08:07 CLAassistant

cla signed.

mikeroyal avatar Jul 16 '19 18:07 mikeroyal

Hi @mikeroyal,

providing the CLI package via Snap is something on the roadmap so this PR is gold, thanks!

There's one thing I'd like to discuss before merging: we were planning to use goreleaser to be able to support multiple distribution channels with one single tool to ease maintenance. Since I'm no snap expert, It'd be great if you could have a look at the Snap specific section of their docs to see if your work can be integrated with it.

masci avatar Jul 17 '19 06:07 masci

Hi @masci, goreleaser is indeed supported for snap. https://goreleaser.com/snapcraft/

mikeroyal avatar Jul 17 '19 18:07 mikeroyal

@mikeroyal do you think you can take a stab at using gorelaser to make the snap? Otherwise I can start playing with it and we can add snap later.

masci avatar Jul 18 '19 16:07 masci

@masci, I'll work on it over the weekend.

mikeroyal avatar Jul 19 '19 19:07 mikeroyal

@mikeroyal we merged a working goreleaser config file on master, if you rebase you can add a Snap section to it

masci avatar Jul 31 '19 10:07 masci

Hi @masci, will do and thank you for creating the goreleaser config file with all the requirements it makes adding the snap section a lot easier.

mikeroyal avatar Aug 01 '19 22:08 mikeroyal

Hi @masci, I tried rebasing and GitHub was giving me an error. I'll again tomorrow but in the mean time here's the snapcraft section for the goreleaser.yml file if you want to take a look at it.

snapcraft:
  name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
  summary: CLI for Arduino.
  description: |
    arduino-cli is an all-in-one solution that provides builder, boards/library manager, uploader, discovery and many other tools   	needed to use any Arduino compatible board and platforms.
  confinement: devmode
  base: core18

 apps:
      audrino-cli:
        plugs: ["home", "network", "removable-media"]
  publish: true

mikeroyal avatar Aug 05 '19 00:08 mikeroyal

Hi @mikeroyal , Do you have any update on this?

Please note that we had to change our approach on using goreleaser in the last months (i.e. to support notarization in our CI) so, we do not use goreleaser packaging features anymore.

rsora avatar Mar 26 '20 14:03 rsora

Hi @rsora, I saw that update so it looks like you are using GitHub Actions? If so that actually works well for snaps. Snaps can now easily integrate with GitHub Actions to automate the whole process.

mikeroyal avatar Mar 30 '20 00:03 mikeroyal

Hi @mikeroyal, @manchoz already managed to distribute the Arduino CLI as a snap: https://github.com/manchoz/arduino-cli-snap If you are ok with it I think we can close this one.

umbynos avatar Aug 09 '22 10:08 umbynos

Hi @mikeroyal as already said, you can collaborate with @manchoz to maintain the arduino-cli snap package.

cmaglie avatar Sep 21 '22 12:09 cmaglie