Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puts a hex.pm package url after published #71

Merged
merged 2 commits into from
Dec 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/hex/util.ex
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ defmodule Hex.Util do
defp indent(0), do: " "
defp indent(depth), do: " " <> indent(depth - 1)

def hex_package_url(package, version) do
"#{Hex.url}/packages/#{package}/#{version}"
end

def hexdocs_url(package, version) do
"http://hexdocs.pm/#{package}/#{version}/"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/mix/tasks/hex/publish.ex
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ defmodule Mix.Tasks.Hex.Publish do
case Hex.API.Release.new(meta[:name], tarball, auth, progress) do
{code, _} when code in 200..299 ->
Mix.shell.info("")
Mix.shell.info("Published #{meta[:name]} v#{meta[:version]}")
Mix.shell.info("Published at #{Hex.Util.hex_package_url(meta[:name], meta[:version])}")
Mix.shell.info("Don't forget to upload your documentation with `mix hex.docs`")
{code, body} ->
Mix.shell.error("Pushing #{meta[:name]} v#{meta[:version]} failed (#{code})")
Expand Down