Skip to content

Commit

Permalink
Add mix.exs (#99)
Browse files Browse the repository at this point in the history
This allows Elixir to compile the project without shelling
out to Rebar 3, which is useful in low memory environments.
Generally speaking, I wouldn't say this is a requirement for
projects, but given telemetry usage is widespread, it makes
sense to optimize it to different build tools.

The only downside is that the vsn can no longer be hardcoded
to "git". For this reason, we also introduce a "RELEASE.md"
file with steps to release a new version (which already
requires some extra steps due to the use of ExDoc for docs).
  • Loading branch information
josevalim authored Oct 21, 2021
1 parent f627244 commit 9a9da7b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
7 changes: 7 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Steps for publishing new version

1. Update version in `src/telemetry.app.src`
2. Update version in `docs.sh`
3. Run `./docs.sh`
4. Run `rebar3 as docs hex publish`
5. Run `rebar3 as docs hex docs`
20 changes: 20 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is only used by Telemetry as a dependency.
# Use rebar3 instead for compiling, running tests, etc.
defmodule Telemetry.MixProject do
use Mix.Project

{:ok, [{:application, :telemetry, props}]} = :file.consult("src/telemetry.app.src")
@props props

def application do
@props
end

def project do
[
app: :telemetry,
version: to_string(application()[:vsn]),
language: :erlang
]
end
end
2 changes: 1 addition & 1 deletion src/telemetry.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, telemetry,
[{description, "Dynamic dispatching library for metrics and instrumentations"},
{vsn, "git"},
{vsn, "1.0.0"},
{registered, []},
{mod, {telemetry_app, []}},
{applications,
Expand Down

0 comments on commit 9a9da7b

Please sign in to comment.