Skip to content

Commit

Permalink
Replace Package/Distribution.plist with a heredoc in script/package.
Browse files Browse the repository at this point in the history
Partial mas-cli#638

Signed-off-by: Ross Goldberg <[email protected]>
  • Loading branch information
rgoldberg committed Dec 20, 2024
1 parent 8994505 commit 9cab3e4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
23 changes: 0 additions & 23 deletions Package/Distribution.plist

This file was deleted.

2 changes: 1 addition & 1 deletion script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for source in Package.swift Sources Tests; do
done

printf -- $'--> 🐚 ShellCheck\n'
shellcheck -s bash -o all -e SC2296,SC2301,SC2312 -a -P SCRIPTDIR script/**/*(.)
shellcheck -s bash -o all -e SC1088,SC2296,SC2301,SC2312 -a -P SCRIPTDIR script/**/*(.)
((exit_code |= ${?}))

printf -- $'--> 〽️ Markdown\n'
Expand Down
28 changes: 27 additions & 1 deletion script/package
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,33 @@ pkgbuild \
--root "${destination_root}" \
"${build_dir}/mas_components.pkg"

# shellcheck disable=SC1036
productbuild \
--distribution Package/Distribution.plist \
--distribution =(cat <<'END'
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="2">
<pkg-ref id="com.mphys.mas-cli">
<bundle-version/>
</pkg-ref>
<pkg-ref id="com.mphys.mas-cli" onConclusion="none">#mas_components.pkg</pkg-ref>
<domains enable_localSystem="true" enable_anywhere="true" enable_currentUserHome="false"/>
<options customize="never" require-scripts="false"/>
<volume-check>
<allowed-os-versions>
<os-version min="10.13"/>
</allowed-os-versions>
</volume-check>
<choices-outline>
<line choice="default">
<line choice="com.mphys.mas-cli"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="com.mphys.mas-cli" visible="false">
<pkg-ref id="com.mphys.mas-cli"/>
</choice>
</installer-gui-script>
END
) \
--package-path "${build_dir}" \
"${build_dir}/mas-${version}.pkg"

0 comments on commit 9cab3e4

Please sign in to comment.