Add version to Mac app (#899)

This commit is contained in:
Kevin 2022-01-20 09:01:08 +01:00 committed by GitHub
parent 048446a16b
commit cd757f8811
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -108,6 +108,7 @@ defmodule AppBuilder.MacOS do
options = options =
Keyword.validate!(options, [ Keyword.validate!(options, [
:name, :name,
:version,
:launcher_script, :launcher_script,
:logo_path, :logo_path,
:info_plist, :info_plist,
@ -150,6 +151,7 @@ defmodule AppBuilder.MacOS do
defp build_info_plist(options) do defp build_info_plist(options) do
app_name = Keyword.fetch!(options, :name) app_name = Keyword.fetch!(options, :name)
app_version = Keyword.fetch!(options, :version)
url_schemes = url_schemes =
""" """
@ -202,6 +204,10 @@ defmodule AppBuilder.MacOS do
<string>#{app_name}</string> <string>#{app_name}</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>#{app_name}</string> <string>#{app_name}</string>
<key>CFBundleShortVersionString</key>
<string>#{app_version}</string>
<key>CFBundleVersion</key>
<string>#{app_version}</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>AppIcon</string> <string>AppIcon</string>
<key>CFBundleIconName</key> <key>CFBundleIconName</key>

View file

@ -127,6 +127,7 @@ defmodule Livebook.MixProject do
@app_options [ @app_options [
name: "Livebook", name: "Livebook",
version: @version,
logo_path: "static/images/logo.png", logo_path: "static/images/logo.png",
url_schemes: ["livebook"], url_schemes: ["livebook"],
document_types: [ document_types: [