elixir-mint / castore

Up-to-date certificate store for Elixir. 🔐
161 stars 20 forks source link

Release 1.20.1 from hex missed VERSION file referenced in mix.exs #50

Closed samuelventura closed 1 year ago

samuelventura commented 1 year ago
Error while loading project :castore at /home/samuel/dpi_ws/uriel_counter/deps/castore
** (File.Error) could not read file "VERSION": no such file or directory

mix.lock

  "castore": {:hex, :castore, "0.1.21", "f618df4d83ad844979e2748cb76937d970ea2c1aee3ca96d4c8301884b9939a1", [:mix], [], "hexpm", "1e4c72e5c476e50deee88ec1e6949f804c9a410d813dc17d3ce78b9b7c55b289"},

mix.exs

defmodule CAStore.MixProject do
  use Mix.Project

  @repo_url "https://github.com/elixir-mint/castore"

  def project do
    [
      app: :castore,
      version: version(),
      elixir: "~> 1.0",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      xref: [exclude: [:public_key]],

      # Hex
      package: package(),
      description: "Up-to-date CA certificate store.",

      # Docs
      name: "CAStore",
      docs: [
        source_ref: "v#{version()}",
        source_url: @repo_url
      ]
    ]
  end

  def application do
    [
      extra_applications: [:logger]
    ]
  end

  defp deps do
    [
      {:ex_doc, "~> 0.22", only: :dev}
    ]
  end

  defp package do
    [
      files: ["lib/castore.ex", "priv", "mix.exs", "README.md"],
      licenses: ["Apache-2.0"],
      links: %{"GitHub" => @repo_url}
    ]
  end

  defp version do
    "VERSION"
    |> File.read!()
    |> String.trim()
  end
end
samuelventura commented 1 year ago

Hex shows different checksum.

Nyx1197 commented 1 year ago

Same problam, create "VERSION" file in /deps/castore/, and compile ok.

NickTaylor- commented 1 year ago

Yeah, I just did echo "0.1.21" > deps/catstore/VERSION as a stopgap.

Nyx1197 commented 1 year ago

i already send a pull request and wait respon

ntmonson commented 1 year ago

Until the PR is merged and a new version is pushed to hex you can probably use

{:castore, "== 0.1.20", override: true}

in your deps to keep packages from updating castore to 0.1.21. This will work in your ci/cd pipelines where manually adding the file to the deps folder will not.

Nyx1197 commented 1 year ago

thanks, that's help a lot

ArthurClemens commented 1 year ago

Yeah, I just did echo "0.1.21" > deps/catstore/VERSION as a stopgap.

That should be echo "0.1.21" > deps/castore/VERSION

adamu commented 1 year ago

Hex shows different checksum.

Indeed, the GitHub tagged version does not require VERSION, so it appears a different file was included in the hex package.

ericmj commented 1 year ago

We have released 0.1.22 that matches what's on github.