Giter VIP home page Giter VIP logo

Comments (10)

bfabiszewski avatar bfabiszewski commented on June 16, 2024

Thanks for the idea!

I don't use homebrew and don't have any idea how to implement this.
When I find time I'll have a look at it.

In the meantime, if anyone wants to create a homebrew cask for the plugin I'll be glad to add it to install instructions.

from qlmobi.

Jon-Schneider avatar Jon-Schneider commented on June 16, 2024

It doesn't look like it should be all that hard, though they prefer the official maintainers do it to get in the main repository - here's the Cask entry for QLMarkdown:

https://github.com/caskroom/homebrew-cask/blob/master/Casks/qlmarkdown.rb

cask 'qlmarkdown' do
  version '1.3.5'
  sha256 'a290edf5b6124cbd4e526217e0979a9011c8ef3b964a33458f5063d51a9b15f2'

  url "https://github.com/toland/qlmarkdown/releases/download/v#{version}/QLMarkdown.qlgenerator.zip"
  appcast 'https://github.com/toland/qlmarkdown/releases.atom',
          checkpoint: '90c2dd6a28f257f169c067ad0f8b24b42cf0edd38955bfe0e629215cf8db74f7'
  name 'QLMarkdown'
  homepage 'https://github.com/toland/qlmarkdown'

  qlplugin 'QLMarkdown.qlgenerator'
end

from qlmobi.

Jon-Schneider avatar Jon-Schneider commented on June 16, 2024

For the current version of QLMobi that would be:

cask 'qlmobi' do
  version '0.5'
  sha256 '1035181685c3ed974bd45ade8f22717c62142ff6a75cf679128f8fb50ef26833'

  url 'https://github.com/bfabiszewski/QLMobi/releases/download/v0.5/QLMobi.qlgenerator.zip'
  appcast 'https://github.com/bfabiszewski/QLMobi/releases.atom',
          checkpoint: '6411eb86a26c0912d9f2213d3d20bddb7a9a351d3c15d507dab4e71576ea2c85'
  name 'QLMobi'
  homepage 'https://github.com/bfabiszewski/QLMobi'

  qlplugin 'QLMobi.qlgenerator'
end

I used shasum -a 256 [zip file] to calculate the checksum, verifying that using the command on the QLMarkdown zip matched the formula hash.

from qlmobi.

bfabiszewski avatar bfabiszewski commented on June 16, 2024

Thanks a lot!

I rechecked the sha hashes and everything seems fine. I would only use #{version} variable in url instead of hardcoding version number (as in qlmarkdown example).

The pull request requires a number of checks before submitting:

  • brew cask audit --download {{cask_file}} is error-free.
  • brew cask style --fix {{cask_file}} reports no offenses.
  • brew cask install {{cask_file}} worked successfully.
  • brew cask uninstall {{cask_file}} worked successfully.

As I don't have brew I can't test it. Did you actually run those checks?

from qlmobi.

Jon-Schneider avatar Jon-Schneider commented on June 16, 2024

I just did, with no problems.

Here's the final code - it now uses the version variable in the download url:

cask 'qlmobi' do
  version '0.5'
  sha256 '1035181685c3ed974bd45ade8f22717c62142ff6a75cf679128f8fb50ef26833'

  url "https://github.com/bfabiszewski/QLMobi/releases/download/v#{version}/QLMobi.qlgenerator.zip"
  appcast 'https://github.com/bfabiszewski/QLMobi/releases.atom',
          checkpoint: '6411eb86a26c0912d9f2213d3d20bddb7a9a351d3c15d507dab4e71576ea2c85'
  name 'QLMobi'
  homepage 'https://github.com/bfabiszewski/QLMobi'

  qlplugin 'QLMobi.qlgenerator'
end

from qlmobi.

Jon-Schneider avatar Jon-Schneider commented on June 16, 2024

Here's a fork with the cask added: https://github.com/Jon-Schneider/homebrew-cask/blob/add-qlmobi/Casks/qlmobi.rb. I can make the PR if you want.

from qlmobi.

bfabiszewski avatar bfabiszewski commented on June 16, 2024

Great!
Sure, go ahead with pull request.

from qlmobi.

Jon-Schneider avatar Jon-Schneider commented on June 16, 2024

PR: Homebrew/homebrew-cask#30157

from qlmobi.

bfabiszewski avatar bfabiszewski commented on June 16, 2024

Jon, thanks a lot for taking care of this!

from qlmobi.

Jon-Schneider avatar Jon-Schneider commented on June 16, 2024

Cask is Merged.

from qlmobi.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.