uxjp / file_crusher

0 stars 0 forks source link

Deploy a package to HEX #5

Closed uxjp closed 1 month ago

uxjp commented 1 month ago

There is the user registration in hex first.

uxjp commented 1 month ago

Create an account

https://hex.pm

Screenshot 2024-07-14 at 12 46 19

https://hex.pm/signup

Screenshot 2024-07-14 at 12 47 23

email confirmation successful

image
uxjp commented 1 month ago
Screenshot 2024-07-14 at 13 02 14
uxjp commented 1 month ago

https://hexdocs.pm/hex/Mix.Tasks.Hex.User.html

Screenshot 2024-07-14 at 13 26 30
uxjp commented 1 month ago
Screenshot 2024-07-14 at 13 29 08
uxjp commented 1 month ago
Screenshot 2024-07-14 at 15 15 03

attention to the files attribute defined on the package attribute.

Screenshot 2024-07-14 at 15 16 15
uxjp commented 1 month ago

https://hexdocs.pm/hex/Mix.Tasks.Hex.Publish.html

Screenshot 2024-07-14 at 15 19 12 Screenshot 2024-07-14 at 15 20 17
uxjp commented 1 month ago

https://github.com/elixir-lang/elixir/releases https://elixirforum.com/t/ubuntu-20-04-lts-elixir-version-update/44068 because of Ubuntu 20 I got elixir 1.9 as the upper possible version while using apt

Used to get elixir 1.13 on ubuntu 20 - got from https://elixirforum.com/t/ubuntu-20-04-lts-elixir-version-update/44068/8?u=uxjp

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt update
sudo apt install esl-erlang
Screenshot 2024-07-14 at 15 45 26
uxjp commented 1 month ago

After updating Elixir got this error concerning hex, had to updated it.

18:47:44.287 [error] beam/beam_load.c(551): Error loading function 'Elixir.Hex.Netrc.Cache':child_spec/1: op put_tuple u x:
  please re-compile this module with an Erlang/OTP 25 compiler

18:47:44.295 [error] beam/beam_load.c(551): Error loading function 'Elixir.Hex.Netrc.Cache':child_spec/1: op put_tuple u x:
  please re-compile this module with an Erlang/OTP 25 compiler

18:47:44.287 [error] Loading of /root/.mix/archives/hex-2.1.1/hex-2.1.1/ebin/Elixir.Hex.Netrc.Cache.beam failed: :badfile

18:47:44.295 [error] Loading of /root/.mix/archives/hex-2.1.1/hex-2.1.1/ebin/Elixir.Hex.Netrc.Cache.beam failed: :badfile

18:47:44.301 [notice] Application hex exited: exited in: Hex.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (ArgumentError) The module Hex.Netrc.Cache was given as a child to a supervisor but it does not exist.
            (elixir 1.13.4) lib/supervisor.ex:631: Supervisor.init_child/1
            (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
            (elixir 1.13.4) lib/supervisor.ex:617: Supervisor.init/2
            (elixir 1.13.4) lib/supervisor.ex:556: Supervisor.start_link/2
            (kernel 8.5.4) application_master.erl:293: :application_master.start_it_old/4

18:47:44.303 [notice] Application inets exited: :stopped

18:47:44.304 [notice] Application ssl exited: :stopped

18:47:44.304 [notice] Application public_key exited: :stopped

18:47:44.304 [notice] Application asn1 exited: :stopped

18:47:44.304 [notice] Application crypto exited: :stopped
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
** (MatchError) no match of right hand side value: {:error, {:hex, {:bad_return, {{Hex.Application, :start, [:normal, []]}, {:EXIT, {%ArgumentError{message: "The module Hex.Netrc.Cache was given as a child to a supervisor but it does not exist."}, [{Supervisor, :init_child, 1, [file: 'lib/supervisor.ex', line: 631]}, {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1593]}, {Supervisor, :init, 2, [file: 'lib/supervisor.ex', line: 617]}, {Supervisor, :start_link, 2, [file: 'lib/supervisor.ex', line: 556]}, {:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 293]}]}}}}}}
    (hex 2.1.1) lib/hex.ex:5: Hex.start/0
    (mix 1.13.4) lib/mix/hex.ex:59: Mix.Hex.start/0
    (mix 1.13.4) lib/mix/dep/loader.ex:203: Mix.Dep.Loader.with_scm_and_app/4
    (mix 1.13.4) lib/mix/dep/loader.ex:156: Mix.Dep.Loader.to_dep/3
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.13.4) lib/mix/dep/loader.ex:373: Mix.Dep.Loader.mix_children/2
    (mix 1.13.4) lib/mix/dep/loader.ex:18: Mix.Dep.Loader.children/0
    (mix 1.13.4) lib/mix/dep/converger.ex:57: Mix.Dep.Converger.all/4
Screenshot 2024-07-14 at 15 50 40
uxjp commented 1 month ago

Publishing... Finally!

Screenshot 2024-07-14 at 15 54 01

Had to get some dependencies that I cleaned while debugging; then compile the deps.

Screenshot 2024-07-14 at 15 57 23 Screenshot 2024-07-14 at 15 58 48
uxjp commented 1 month ago

https://hex.pm/packages/file_crusher/0.1.0

Screenshot 2024-07-14 at 16 00 48
uxjp commented 1 month ago

closes this issue #8