Packages

An Elixir framework to build your own in-house PaaS (Platform as a Service).

Current section

Files

Jump to
antikythera lib mix print_version.ex
Raw

lib/mix/print_version.ex

# Copyright(c) 2015-2018 ACCESS CO., LTD. All rights reserved.
defmodule Mix.Tasks.Antikythera.PrintVersion do
@shortdoc "Prints the current version of an OTP app (defaults to current mix project)"
use Mix.Task
def run([]) do
IO.puts(Mix.Project.config()[:version])
end
def run([app_name]) do
lib_dir = Path.join([Mix.Project.build_path(), "lib", app_name])
IO.puts(AntikytheraCore.Version.read_from_app_file(lib_dir, app_name))
end
end