From 8beb45025440f5196fc1efc9412d9676d3633090 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Tue, 11 Jun 2024 15:00:48 +0800 Subject: [PATCH 1/3] docs: update mix docs generation --- README.md | 1 - ex/mix.exs | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5162a37..041b36a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ Supported languages and integrations: - LoggerBackend - a backend for Logger - TelemetryReporter - a telemetry reporter module for `:telemetry_metrics` - ## Development Release tags are prefixed with the language followed by the version, such as `js/v0.1.0`. diff --git a/ex/mix.exs b/ex/mix.exs index 6c52234..6c17a90 100644 --- a/ex/mix.exs +++ b/ex/mix.exs @@ -1,6 +1,7 @@ defmodule LogflareEx.MixProject do use Mix.Project + @source_url "https://github.com/Logflare/warehouse-sdk" @prerelease System.get_env("LOGFLARE_EX_PRERELEASE_VERSION") @version_suffix if(@prerelease, do: "-#{@prerelease}", else: "") def project do @@ -15,6 +16,7 @@ defmodule LogflareEx.MixProject do start_permanent: Mix.env() == :prod, deps: deps(), aliases: aliases(), + docs: docs(), preferred_cli_env: [ "test.format": :test, "test.compile": :test @@ -69,9 +71,22 @@ defmodule LogflareEx.MixProject do defp package() do [ - description: "Logflare Elixir SDK", + description: "Warehouse Elixir SDK", licenses: ["MIT"], - links: %{"GitHub" => "https://github.com/Logflare/logflare-sdk"} + links: %{"GitHub" => @source_url} ] end + + defp docs do + [ + extras: [ + "README.md": [title: "Overview"] + ], + main: "readme", + homepage_url: "https://hex.pm/packages/warehouse_ex", + source_url: @source_url, + formatters: ["html"] + ] + end + end From e801e3ac32868f69f4dd7f634357711a978fd6ff Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Tue, 11 Jun 2024 15:12:22 +0800 Subject: [PATCH 2/3] chore: formatting --- ex/mix.exs | 1 - 1 file changed, 1 deletion(-) diff --git a/ex/mix.exs b/ex/mix.exs index 6c17a90..776d7b1 100644 --- a/ex/mix.exs +++ b/ex/mix.exs @@ -88,5 +88,4 @@ defmodule LogflareEx.MixProject do formatters: ["html"] ] end - end From ea729e1932977e0a88dceb4a6f4941d73a4d64f9 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Tue, 11 Jun 2024 15:25:10 +0800 Subject: [PATCH 3/3] chore: publish package only --- .github/workflows/ex-publish.yml | 2 +- ex/mix.exs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ex-publish.yml b/.github/workflows/ex-publish.yml index 6c315cb..1ac1b1c 100644 --- a/.github/workflows/ex-publish.yml +++ b/.github/workflows/ex-publish.yml @@ -33,7 +33,7 @@ jobs: - run: mix deps.get - run: echo "short_sha=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV - run: echo "timestamp=`date +%s`" >> $GITHUB_ENV - - run: mix hex.publish --yes + - run: mix hex.publish package --yes if: github.event_name == 'push' env: HEX_API_KEY: ${{ secrets.HEX_AUTH_TOKEN }} diff --git a/ex/mix.exs b/ex/mix.exs index 776d7b1..c48ce32 100644 --- a/ex/mix.exs +++ b/ex/mix.exs @@ -85,7 +85,8 @@ defmodule LogflareEx.MixProject do main: "readme", homepage_url: "https://hex.pm/packages/warehouse_ex", source_url: @source_url, - formatters: ["html"] + formatters: ["html"], + filter_modules: ~r/.+\..+\..+$/ ] end end