Skip to content

Commit

Permalink
Remove the get_version_from_git usage for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Aug 1, 2022
1 parent 13319a8 commit 0ae42db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
3 changes: 0 additions & 3 deletions hack/get_version_from_git.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/sh
set -e
set -o pipefail

TAG=$( git tag | grep -E "[0-9]\.[0-9]\.[0-9]" | sort -rn | head -n1 )

if [ -n "${TAG}" ]; then
Expand Down
11 changes: 1 addition & 10 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,18 @@ defmodule Trento.MixProject do
@version "1.1.0"
defp get_version do
case System.get_env("VERSION") do
nil -> get_version_from_git()
nil -> @version
version -> version
end
end

defp get_version_from_git do
case File.cwd!() |> Path.join("hack/get_version_from_git.sh") |> System.cmd([]) do
{version, 0} -> version |> String.trim("\n")
_ -> @version
end
end

def project do
[
app: :trento,
description: "Easing your life in administering SAP applications",
version: get_version(),
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
Expand Down Expand Up @@ -74,7 +66,6 @@ defmodule Trento.MixProject do
{:floki, ">= 0.30.0", only: :test},
{:fun_with_flags, "~> 1.8.1"},
{:fun_with_flags_ui, "~> 0.8.0"},
{:gettext, "~> 0.18"},
{:gen_smtp, "~> 1.2.0"},
{:httpoison, "~> 1.8"},
{:jason, "~> 1.2"},
Expand Down

0 comments on commit 0ae42db

Please sign in to comment.