turtle icon indicating copy to clipboard operation
turtle copied to clipboard

Publish Hex Package

Open mmmries opened this issue 9 years ago • 5 comments

I'm interested in using turtle in an elixir project. Do you have an interest in publishing this package on hex.pm?

I think it would require adding a mix.exs file something like:

defmodule Turtle.Mixfile do
  use Mix.Project

  def project do
    [
      app: :turtle,
      version: "1.5.3",
      deps: deps,
      description: "Turtle manages RabbitMQ connections",
      package: package,
   ]
  end

  def deps do
    [
      {:amqp_client, "~> 3.5"},
      #{:exometer_core, "~> 1.4"}, #TODO publish exometer_core as hex package
      {:gproc, "~> 0.5"},
      {:uuid, "~> 1.5", hex: :uuid_erl},
    ]
  end

  def package do
    [
      files: ~w(src rebar.config README.md LICENCSE Makefile),
      licenses: ["Apache 2.0"],
      links: %{"Github" => "https://github.com/shopgun/turtle"},
      maintainers: ["Jesper Louis Andersen <[email protected]>"],
    ]
  end
end

But I will need to also make exometer_core into a hex package which will require making hut into a hex package (I think and hope that the yakshave ends there).

I just wanted to make sure this is something you are interested in before continuing to invest effort into making it work.

mmmries avatar Feb 18 '16 05:02 mmmries

Yes, it should definitely get published on Hex!

I think the best way to go at it is that you update this issue once you have exometer_core under control, then I'll just add the rebar3_hex plugin and push through it. That way, I avoid having to keep track of a mix configuration file as well in addition to the rebar3 one.

jlouis avatar Feb 18 '16 11:02 jlouis

It looks like the basho team pushed their fork of exometer_core to hex. Have you tried using their fork? https://hex.pm/packages/exometer_core

I'm not sure how much they differ from the Feuerlabs/exometer_core project, but if they are compatible we might want to move forward with specifying exometer_core package as it exists in hex

mmmries avatar Apr 27 '16 22:04 mmmries

This is a good idea. I, or someone else, would have to detect where the primary differences are however. We are using exometer_core extensively internally at ShopGun, so there would have to be some similarity between the projects.

jlouis avatar Apr 29 '16 11:04 jlouis

A quick glance at https://github.com/basho/exometer_core/network says they are practically different. The fork is old, and few things are being cherry-picked among them. Does Hex support having multiple variants of a package uploaded? It would be nice if it had that support.

Alternatively, we could try to lobby Basho to let Feuerlabs use the name.

jlouis avatar Apr 29 '16 11:04 jlouis

It seems the current Hex.pm exometer_core is now version 1.4.0 which is the version we need. We then need to make sure we also have uuid and amqp_client in decent versions on top of hex.pm, but then the switch should be possible.

As for publishing, I have good experience with using hexer by Inaka, so that is what I'll eventually use. If you need a mix build script, you will have to supply that as a PR, which we'll gladly take and include :)

jlouis avatar Aug 21 '16 14:08 jlouis