Files
markdownViewr/project.yml
2026-07-23 08:31:48 -05:00

140 lines
4.0 KiB
YAML

name: markdownViewr
options:
bundleIdPrefix: com.dkelkhoff
deploymentTarget:
macOS: "13.0"
xcodeVersion: "15.0"
generateEmptyDirectories: true
packages:
swift-markdown:
url: https://github.com/apple/swift-markdown.git
from: "0.4.0"
sparkle:
url: https://github.com/sparkle-project/Sparkle.git
from: "2.0.0"
# Shared base for both distribution targets. The two targets differ ONLY in their
# Sparkle dependency (Developer ID has it, App Store must not — Sparkle's helpers
# can't be sandboxed), the sandbox entitlements, and the MAS_BUILD flag.
targetTemplates:
AppBase:
type: application
platform: macOS
sources:
- markdownViewr
resources:
- markdownViewr/Resources
dependencies:
- package: swift-markdown
product: Markdown
settings:
base:
INFOPLIST_FILE: markdownViewr/Info.plist
PRODUCT_BUNDLE_IDENTIFIER: com.dkelkhoff.markdownViewr
PRODUCT_NAME: markdownViewr
MARKETING_VERSION: "1.5.0"
CURRENT_PROJECT_VERSION: "5"
MACOSX_DEPLOYMENT_TARGET: "13.0"
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
targets:
markdownViewrTests:
type: bundle.unit-test
platform: macOS
sources:
- markdownViewrTests
dependencies:
- target: markdownViewr
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.dkelkhoff.markdownViewrTests
MACOSX_DEPLOYMENT_TARGET: "13.0"
GENERATE_INFOPLIST_FILE: YES
# Developer ID distribution (notarized DMG + Sparkle auto-update). `just release`.
markdownViewr:
templates:
- AppBase
dependencies:
- package: sparkle
product: Sparkle
info:
path: markdownViewr/Info.plist
properties:
CFBundleDocumentTypes:
- CFBundleTypeName: Markdown Document
CFBundleTypeRole: Viewer
LSHandlerRank: Default
LSItemContentTypes:
- net.daringfireball.markdown
- public.plain-text
CFBundleTypeExtensions:
- md
- markdown
- mdown
- mkd
UTImportedTypeDeclarations:
- UTTypeIdentifier: net.daringfireball.markdown
UTTypeDescription: Markdown Document
UTTypeConformsTo:
- public.plain-text
UTTypeTagSpecification:
public.filename-extension:
- md
- markdown
- mdown
- mkd
CFBundleShortVersionString: "$(MARKETING_VERSION)"
CFBundleVersion: "$(CURRENT_PROJECT_VERSION)"
LSApplicationCategoryType: "public.app-category.productivity"
SUFeedURL: "https://raw.githubusercontent.com/darinkelkhoff/markdownViewr/main/appcast.xml"
SUPublicEDKey: "flXZnzfoR5H/JgMTtAGza8SUcUbfK4FWUPEBjxkSZyc="
# Mac App Store distribution (sandboxed, no Sparkle). `just release-mas`.
# Consumes the Info.plist generated by the markdownViewr target above and strips
# the (now-irrelevant) Sparkle feed keys from its own bundle copy.
markdownViewr-MAS:
templates:
- AppBase
settings:
base:
SWIFT_ACTIVE_COMPILATION_CONDITIONS: MAS_BUILD
CODE_SIGN_ENTITLEMENTS: markdownViewr/markdownViewr-MAS.entitlements
postBuildScripts:
- name: Strip Sparkle keys from MAS Info.plist
script: |
PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Delete :SUFeedURL" "$PLIST" 2>/dev/null || true
/usr/libexec/PlistBuddy -c "Delete :SUPublicEDKey" "$PLIST" 2>/dev/null || true
schemes:
markdownViewr:
build:
targets:
markdownViewr: all
run:
config: Debug
test:
config: Debug
targets:
- markdownViewrTests
profile:
config: Release
analyze:
config: Debug
archive:
config: Release
markdownViewr-MAS:
build:
targets:
markdownViewr-MAS: all
run:
config: Debug
profile:
config: Release
analyze:
config: Debug
archive:
config: Release