Skip to content

Commit 6e3a6a2

Browse files
committed
Fix build versioning
1 parent 9f1e395 commit 6e3a6a2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

software/mac/mathpad-service/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ echo "Cleaning previous dist..."
1919
rm -rf dist/
2020
mkdir -p dist/
2121

22+
# Extract version info from Swift file
23+
VERSION=$(grep 'static let version = ' MathpadService.swift | sed 's/.*= "\(.*\)".*/\1/')
24+
BUILD_DATE=$(grep 'static let buildDate = ' MathpadService.swift | sed 's/.*= "\(.*\)".*/\1/')
25+
26+
echo "Version: $VERSION"
27+
echo "Build Date: $BUILD_DATE"
28+
2229
# Compile mathpad-service
2330
# Create app bundle structure
2431
mkdir -p "build/${APP_NAME}/Contents/MacOS"
@@ -53,7 +60,7 @@ cat > "build/${APP_NAME}/Contents/Info.plist" << EOF
5360
<key>CFBundlePackageType</key>
5461
<string>APPL</string>
5562
<key>CFBundleVersion</key>
56-
<string>1.0.0</string>
63+
<string>$VERSION</string>
5764
<key>LSBackgroundOnly</key>
5865
<true/>
5966
<key>LSUIElement</key>

0 commit comments

Comments
 (0)