-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ignore-dev-and-umbrella
- Loading branch information
Showing
8 changed files
with
104 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Used by "mix format" | ||
[ | ||
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- pair: | ||
elixir: 1.7.4 | ||
otp: 21.3.8.17 | ||
- pair: | ||
elixir: 1.12.0 | ||
otp: 24.0.1 | ||
lint: lint | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.pair.otp}} | ||
elixir-version: ${{matrix.pair.elixir}} | ||
|
||
- name: Install Dependencies | ||
run: mix deps.get | ||
|
||
- run: mix format --check-formatted | ||
if: ${{ matrix.lint }} | ||
|
||
- run: mix test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-elixir@v1 | ||
with: | ||
otp-version: 22.x | ||
elixir-version: 1.10.x | ||
- run: mix deps.get | ||
- run: mix hex.publish --yes |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
defmodule Mix.Tasks.Kudos.Generate do | ||
use Mix.Task | ||
|
||
@shortdoc "Generates a licenses file" | ||
@recursive false | ||
use Mix.Task | ||
|
||
def run(args \\ []) do | ||
IO.puts("Generating Licenses file...") | ||
@shortdoc "Generates a licenses file" | ||
@recursive false | ||
|
||
resp = | ||
Kudos.generate() | ||
|> handle_licenses(dry_run?(args)) | ||
def run(args \\ []) do | ||
IO.puts("Generating Licenses file...") | ||
|
||
case resp do | ||
:ok -> IO.puts("Done!") | ||
_ -> IO.puts("Failed!") | ||
end | ||
end | ||
resp = | ||
Kudos.generate() | ||
|> handle_licenses(dry_run?(args)) | ||
|
||
defp handle_licenses(content, true) do | ||
IO.puts(content) | ||
:ok | ||
case resp do | ||
:ok -> IO.puts("Done!") | ||
_ -> IO.puts("Failed!") | ||
end | ||
end | ||
|
||
defp handle_licenses(content, false) do | ||
File.write("licenses.md", content) | ||
end | ||
|
||
defp dry_run?(args) do | ||
Enum.member?(args, "--dry-run") | ||
end | ||
end | ||
defp handle_licenses(content, true) do | ||
IO.puts(content) | ||
:ok | ||
end | ||
|
||
defp handle_licenses(content, false) do | ||
File.write("licenses.md", content) | ||
end | ||
|
||
defp dry_run?(args) do | ||
Enum.member?(args, "--dry-run") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters