livebook/app_bundler/demo/mix.exs

72 lines
1.4 KiB
Elixir
Raw Normal View History

defmodule Demo.MixProject do
2022-01-18 00:34:38 +08:00
use Mix.Project
def project do
[
app: :demo,
2022-01-18 00:34:38 +08:00
version: "0.1.0",
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
releases: releases()
]
end
def application do
[
extra_applications: [:wx, :logger],
mod: {Demo.Application, []}
2022-01-18 00:34:38 +08:00
]
end
defp deps do
[
2022-07-19 20:58:43 +08:00
{:app_bundler, path: ".."}
2022-01-18 00:34:38 +08:00
]
end
defp releases do
macos_notarization = macos_notarization()
2022-01-18 00:34:38 +08:00
[
app: [
steps: [
:assemble,
&AppBundler.bundle/1
],
app: [
name: "Demo",
url_schemes: ["wxdemo"],
document_types: [
[
name: "Demo",
extensions: ["wxdemo"],
macos: [
role: "Editor"
]
]
],
macos: [
build_dmg: macos_notarization != nil,
notarization: macos_notarization
],
windows: [
build_installer: true
]
]
2022-01-18 00:34:38 +08:00
]
]
end
defp macos_notarization do
identity = System.get_env("NOTARIZE_IDENTITY")
team_id = System.get_env("NOTARIZE_TEAM_ID")
apple_id = System.get_env("NOTARIZE_APPLE_ID")
password = System.get_env("NOTARIZE_PASSWORD")
2022-01-18 00:34:38 +08:00
if identity && team_id && apple_id && password do
[identity: identity, team_id: team_id, apple_id: apple_id, password: password]
end
2022-01-18 00:34:38 +08:00
end
end