Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 7 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ name: Actions CI

on: push

env:
CUATRO_HEX_KEY: ${{ secrets.CUATRO_HEX_KEY }}

jobs:
bless:
name: Bless
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
MIX_ENV: test

Expand Down Expand Up @@ -51,7 +48,6 @@ jobs:
run: |
mix local.rebar --force
mix local.hex --force
mix hex.organization auth cuatro --key $CUATRO_HEX_KEY
mix deps.get

- name: Compile dependencies
Expand All @@ -72,12 +68,14 @@ jobs:

publish-hex-package:
name: Publish Hex Package ⬆️☁️
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
env:
MIX_ENV: dev
needs:
- bless
permissions:
contents: write

steps:
- name: Checkout
Expand Down Expand Up @@ -118,7 +116,6 @@ jobs:
run: |
mix local.rebar --force
mix local.hex --force
mix hex.organization auth cuatro --key $CUATRO_HEX_KEY
mix deps.get

- name: Compile dependencies
Expand All @@ -141,28 +138,14 @@ jobs:

- name: Create a GitHub Release
id: create_release
uses: NFIBrokerage/create-release@v4
uses: elgohr/Github-Release-Action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
name: Release ${{ env.TAG }}
draft: false
title: Release ${{ env.TAG }}
prerelease: false

- name: Publish library
run: mix hex.publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_PUBLISH_KEY }}

- name: Notify ops channel of build success
run: >
curl
-X POST
-H 'Content-type:application/json'
-d "{\"text\":\":hexpm: package published for $REPOSITORY $(git tag -ln $TAG)\"}"
$SLACK_WEBHOOK
env:
SLACK_WEBHOOK: ${{ secrets.OPS_CHANNEL_SLACK_WEBHOOK }}

# Generated by Elixir.Gaas.Generators.Simple.Actions.LibraryCi
8 changes: 1 addition & 7 deletions .github/workflows/refresh-dev-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ on:
# Would like to run this as a scheduled workflow, but that is not currently
# supported by the actions/cache action.

env:
CUATRO_HEX_KEY: ${{ secrets.CUATRO_HEX_KEY }}

jobs:
refresh-dev-cache:
name: Refresh Dev Cache
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
MIX_ENV: dev

Expand Down Expand Up @@ -74,7 +71,6 @@ jobs:
run: |
mix local.rebar --force
mix local.hex --force
mix hex.organization auth cuatro --key $CUATRO_HEX_KEY
mix deps.get

- name: Compile dependencies
Expand All @@ -83,5 +79,3 @@ jobs:

- name: Compile application
run: mix compile

# Generated by Elixir.Gaas.Generators.Simple.Actions.RefreshDevCache
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.11.0-otp-22
erlang 22.3
elixir 1.17.3-otp-27
erlang 27.1
10 changes: 3 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to

- Updated `actions/checkout@` from `v3` to `v4` in GH actions
- Updated `actions/cache@` from `v3` to `v4` in GH actions
- Updated `NFIBrokerage/create-release@` from `v3` to `v4` in GH actions
- Updated `CuatroElixir/create-release@` from `v3` to `v4` in GH actions

## 0.8.1 - 2023-08-24

### Changed

- Updated `actions/checkout@` from `v1` to `v3` in GH actions
- Updated `actions/cache@` from `v1` to `v3` in GH actions
- Updated `NFIBrokerage/create-release@` from `v2` to `v3` in GH actions
- Change `release_name` to `name` field in `NFIBrokerage/create-release@v3`
- Updated `CuatroElixir/create-release@` from `v2` to `v3` in GH actions
- Change `release_name` to `name` field in `CuatroElixir/create-release@v3`
action in GH actions
- Fixed credo warnings

Expand Down Expand Up @@ -235,7 +235,3 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## initial commit - 2020-08-19

### Added

- This project was generated by Gaas

<!-- # Generated by Elixir.Gaas.Generators.Simple.Library.Changelog -->
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,3 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

# Generated by Elixir.Gaas.Generators.Simple.License
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Harness

![Actions CI](https://github.com/NFIBrokerage/harness/workflows/Actions%20CI/badge.svg)
![Actions CI](https://github.com/CuatroElixir/harness/workflows/Actions%20CI/badge.svg)

A command line tool for harnessing Elixir boilerplate.

Expand Down Expand Up @@ -41,4 +41,4 @@ asdf global elixir 1.10.4-otp-22
mix archive.install hex harness --force
```

[harness-dotfiles]: https://github.com/NFIBrokerage/harness_dotfiles
[harness-dotfiles]: https://github.com/CuatroElixir/harness_dotfiles
6 changes: 3 additions & 3 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ metadata:
files locally and versions them, allowing you to semantically version your
service chasses.
annotations:
github.com/project-slug: NFIBrokerage/harness
backstage.io/source-ref: https://github.com/NFIBrokerage/harness
backstage.io/github-actions-id: https://github.com/NFIBrokerage/harness
github.com/project-slug: CuatroElixir/harness
backstage.io/source-ref: https://github.com/CuatroElixir/harness
backstage.io/github-actions-id: https://github.com/CuatroElixir/harness
tags:
- config
- eex
Expand Down
4 changes: 1 addition & 3 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
use Mix.Config

# Generated by Elixir.Gaas.Generators.Simple.ConfigConfig
import Config
22 changes: 9 additions & 13 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ defmodule Harness.MixProject do

@version_file Path.join(__DIR__, ".version")
@external_resource @version_file
@source_url "https://github.com/NFIBrokerage/harness"
@source_url "https://github.com/CuatroElixir/harness"
@version (case Regex.run(~r/^v([\d\.\w-]+)/, File.read!(@version_file),
capture: :all_but_first
) do
[version] -> version
nil -> "0.0.0"
end)

def project do
[
app: :harness,
version: version() || "0.0.0",
version: @version,
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand All @@ -28,16 +34,6 @@ defmodule Harness.MixProject do
]
end

defp version do
Regex.run(
~r/^v([\d\.]+)/,
File.read!(@version_file),
capture: :all_but_first
)
|> List.wrap()
|> List.first()
end

defp elixirc_paths(:test), do: ["lib", "test/fixtures"]
defp elixirc_paths(_), do: ["lib"]

Expand All @@ -53,7 +49,7 @@ defmodule Harness.MixProject do
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
# test
{:bless, "~> 1.0", only: :test},
{:convene, "~> 0.2", organization: "cuatro", only: :test},
{:credo, "~> 1.7", only: :test},
{:excoveralls, "~> 0.7", only: :test}
]
end
Expand Down
7 changes: 3 additions & 4 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
%{
"bless": {:hex, :bless, "1.2.0", "5e8190738dcf2fedcbcee2433b44f0e4629a1b0ce84052e5ba17f8dff48d42bd", [:mix], [], "hexpm", "046692560e401dc33c2bb3223bb3f210c18fafbae24431f0056516bb5c8be805"},
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
"convene": {:hex, :convene, "0.2.2", "2495b032aff9a8d5b87b5db83c64e65a90e61d438dda2f72fc951d2093ceaea3", [:mix], [{:credo, "~> 1.4", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm:cuatro", "83e0a113b38315091e5d65fc12f02f1f518b317eee9bf9dfe3dd01efb64ece51"},
"credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"},
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"credo": {:hex, :credo, "1.7.15", "283da72eeb2fd3ccf7248f4941a0527efb97afa224bcdef30b4b580bc8258e1c", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "291e8645ea3fea7481829f1e1eb0881b8395db212821338e577a90bf225c5607"},
"earmark_parser": {:hex, :earmark_parser, "1.4.33", "3c3fd9673bb5dcc9edc28dd90f50c87ce506d1f71b70e3de69aa8154bc695d44", [:mix], [], "hexpm", "2d526833729b59b9fdb85785078697c72ac5e5066350663e5be6a1182da61b8f"},
"ex_doc": {:hex, :ex_doc, "0.30.5", "aa6da96a5c23389d7dc7c381eba862710e108cee9cfdc629b7ec021313900e9e", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "88a1e115dcb91cefeef7e22df4a6ebbe4634fbf98b38adcbc25c9607d6d9d8e6"},
"excoveralls": {:hex, :excoveralls, "0.17.0", "279f124dba347903bb654bc40745c493ae265d45040001b4899ea1edf88078c7", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "08b638d114387a888f9cb8d65f2a0021ec04c3e447b793efa7c1e734aba93004"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
"file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
Expand Down
2 changes: 0 additions & 2 deletions test/harness_test.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
defmodule HarnessTest do
use ExUnit.Case
end

# Generated by Elixir.Gaas.Generators.Simple.BaseModuleTest
2 changes: 0 additions & 2 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
ExUnit.start()

# Generated by Elixir.Gaas.Generators.Simple.TestHelper