38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
|
source "$ROOT/version.env"
|
|
OUTPUT="$ROOT/Sources/imsg/Version.swift"
|
|
PLIST_OUTPUT="$ROOT/Sources/imsg/Resources/Info.plist"
|
|
mkdir -p "$(dirname "$OUTPUT")"
|
|
mkdir -p "$(dirname "$PLIST_OUTPUT")"
|
|
cat > "$OUTPUT" <<SWIFT
|
|
// Generated by scripts/generate-version.sh. Do not edit.
|
|
enum IMsgVersion {
|
|
static let current = "${MARKETING_VERSION}"
|
|
}
|
|
SWIFT
|
|
|
|
cat > "$PLIST_OUTPUT" <<PLIST
|
|
<?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>CFBundleIdentifier</key>
|
|
<string>com.steipete.imsg</string>
|
|
<key>CFBundleName</key>
|
|
<string>imsg</string>
|
|
<key>CFBundleExecutable</key>
|
|
<string>imsg</string>
|
|
<key>CFBundlePackageType</key>
|
|
<string>APPL</string>
|
|
<key>CFBundleShortVersionString</key>
|
|
<string>${MARKETING_VERSION}</string>
|
|
<key>CFBundleVersion</key>
|
|
<string>${MARKETING_VERSION}</string>
|
|
<key>NSAppleEventsUsageDescription</key>
|
|
<string>Send messages via Messages.app.</string>
|
|
</dict>
|
|
</plist>
|
|
PLIST
|