Skip to content

Commit e692712

Browse files
Merge pull request #19 from PostHog/improve-docs
2 parents d8bdae6 + a344d76 commit e692712

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

.github/workflows/cd.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
id: versions
5353
if: steps.bump-type.outputs.bump-type != 'null'
5454
run: |
55-
OLD_VERSION=$(grep 'version:' mix.exs | grep -o '"[0-9]\+\.[0-9]\+\.[0-9]\+"' | tr -d '"')
55+
OLD_VERSION=$(grep '@version "' mix.exs | grep -o '"[0-9]\+\.[0-9]\+\.[0-9]\+"' | tr -d '"')
5656
5757
# Function to bump version using cut
5858
bump_version() {
@@ -81,7 +81,7 @@ jobs:
8181
- name: Update version in mix.exs
8282
if: steps.bump-type.outputs.bump-type != 'null'
8383
run: |
84-
sed -i "s/version: \"${{ steps.versions.outputs.old-version }}\"/version: \"${{ steps.versions.outputs.new-version }}\"/" mix.exs
84+
sed -i "s/@version \"${{ steps.versions.outputs.old-version }}\"/@version \"${{ steps.versions.outputs.new-version }}\"/" mix.exs
8585
8686
- name: Update CHANGELOG.md
8787
run: |
@@ -96,7 +96,8 @@ jobs:
9696
uses: EndBug/add-and-commit@v7
9797
with:
9898
branch: ${{ github.event.pull_request.base.ref }}
99-
message: "chore: Bump version to ${{ steps.versions.outputs.new-version }}"
99+
tag: "v${{ steps.versions.outputs.new-version }}"
100+
message: "chore: Bump version to v${{ steps.versions.outputs.new-version }}"
100101
github_token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
101102

102103
- name: Publish to Hex.pm

docs/cover.jpeg

85.9 KB
Loading

docs/favicon.svg

+15
Loading

mix.exs

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
defmodule Posthog.MixProject do
22
use Mix.Project
33

4+
@version "0.4.2"
5+
46
def project do
57
[
68
app: :posthog,
@@ -9,9 +11,9 @@ defmodule Posthog.MixProject do
911
elixir: "~> 1.12",
1012
elixirc_paths: elixirc_paths(Mix.env()),
1113
package: package(),
12-
source_url: "https://github.com/posthog/posthog-elixir",
14+
docs: docs(),
1315
start_permanent: Mix.env() == :prod,
14-
version: "0.4.2"
16+
version: @version
1517
]
1618
end
1719

@@ -40,6 +42,17 @@ defmodule Posthog.MixProject do
4042
]
4143
end
4244

45+
defp docs do
46+
[
47+
cover: "docs/cover.jpeg",
48+
favicon: "docs/favicon.svg",
49+
logo: "docs/favicon.svg",
50+
source_ref: "v#{@version}",
51+
source_url: "https://github.com/posthog/posthog-elixir",
52+
extras: ["README.md"]
53+
]
54+
end
55+
4356
defp deps do
4457
[
4558
{:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false},

0 commit comments

Comments
 (0)