Skip to content

Commit

Permalink
Add Bakeware as dependency & configure fika to use bakeware for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Atul9 committed Oct 3, 2020
1 parent e7496bc commit d0b5eac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/fika/cli.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
defmodule Fika.Cli do
use Bakeware.Script
require Logger

@impl Bakeware.Script
def main(args) do
parse_args(args)
end
Expand Down
19 changes: 16 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
defmodule Fika.MixProject do
use Mix.Project
@app :fika

def project do
[
app: :fika,
app: @app,
version: "0.1.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
escript: [main_module: Fika.Cli],
deps: deps(),
xref: [exclude: [:router]],
elixirc_paths: elixirc_paths(Mix.env),
releases: [{@app, release()}],
preferred_cli_env: [release: :prod]
]
end

# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {Fika.Application, []}
mod: {Fika.Cli, []}
]
end

# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:nimble_parsec, "~> 0.6.0"},
{:plug_cowboy, "~> 2.0"}
{:plug_cowboy, "~> 2.0"},
{:bakeware, github: "spawnfest/bakeware", tag: "v0.1.0", sparse: "bakeware", runtime: false}

# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
]
end

defp release do
[
overwrite: true,
cookie: "#{@app}_cookie",
steps: [:assemble, &Bakeware.assemble/1],
strip_beams: Mix.env() == :prod
]
end

defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:dev), do: ["lib"]
defp elixirc_paths(_), do: ["lib"]
Expand Down
2 changes: 2 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
%{
"bakeware": {:git, "https://github.com/spawnfest/bakeware.git", "db446f26d37c98cd353e0c0239e0c865417bd144", [tag: "v0.1.0", sparse: "bakeware"]},
"cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
"cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
"elixir_make": {:hex, :elixir_make, "0.6.1", "8faa29a5597faba999aeeb72bbb9c91694ef8068f0131192fb199f98d32994ef", [:mix], [], "hexpm", "35d33270680f8d839a4003c3e9f43afb595310a592405a00afc12de4c7f55a18"},
"mime": {:hex, :mime, "1.4.0", "5066f14944b470286146047d2f73518cf5cca82f8e4815cf35d196b58cf07c47", [:mix], [], "hexpm", "75fa42c4228ea9a23f70f123c74ba7cece6a03b1fd474fe13f6a7a85c6ea4ff6"},
"nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"},
"plug": {:hex, :plug, "1.10.4", "41eba7d1a2d671faaf531fa867645bd5a3dce0957d8e2a3f398ccff7d2ef017f", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ad1e233fe73d2eec56616568d260777b67f53148a999dc2d048f4eb9778fe4a0"},
Expand Down

0 comments on commit d0b5eac

Please sign in to comment.