Something went wrong. Try again.
A minimal, opinionated scratchpad for macOS
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839#!/bin/shset -eAPP=JunknoteID=junknote.junknoteVERSION=0.3.0BUILD=5
swift build -c releaseBIN="$(swift build -c release --show-bin-path)/$APP"
OUT="build/$APP.app"rm -rf "$OUT"mkdir -p "$OUT/Contents/MacOS" "$OUT/Contents/Resources"cp "$BIN" "$OUT/Contents/MacOS/$APP"cp Resources/AppIcon.icns "$OUT/Contents/Resources/"
cat > "$OUT/Contents/Info.plist" <<EOF<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict> <key>CFBundleExecutable</key><string>$APP</string> <key>CFBundleIdentifier</key><string>$ID</string> <key>CFBundleIconFile</key><string>AppIcon</string> <key>CFBundleName</key><string>$APP</string> <key>CFBundlePackageType</key><string>APPL</string> <key>CFBundleShortVersionString</key><string>$VERSION</string> <key>CFBundleVersion</key><string>$BUILD</string> <key>LSApplicationCategoryType</key><string>public.app-category.productivity</string> <key>NSHumanReadableCopyright</key><string>Copyright (c) junknote Contributors, MIT License</string> <key>LSMinimumSystemVersion</key><string>14.0</string> <key>LSUIElement</key><true/></dict></plist>EOF
codesign --force --sign - "$OUT"echo "Built $OUT"