Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.1] - 2024-12-05
### Changed
- Added a preinstall script that will uninstall version 1.X if found.

## [2.0.0] - 2024-12-02
### AKA the Swift Update

Expand Down
1 change: 1 addition & 0 deletions SupportCompanion.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
export.plist,
payload/Library/LaunchDaemons/com.github.macadmins.SupportCompanion.helper.plist,
scripts/postinstall,
scripts/preinstall,
);
target = F6F3BEB82CE1E7BA0036ADB9 /* SupportCompanion */;
};
Expand Down
4 changes: 2 additions & 2 deletions SupportCompanion/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.0.1</string>
<key>CFBundleVersion</key>
<string>2.0.0</string>
<string>2.0.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
18 changes: 18 additions & 0 deletions SupportCompanion/pkgbuild/scripts/preinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/zsh

v1AppPath="/Applications/Utilities/SupportCompanion.app"

# Check if the app exists
if [[ -d "$v1AppPath" ]]; then
# Check if the uninstall script exists
uninstallScript="$v1AppPath/Contents/Resources/Uninstall.sh"
if [[ -f "$uninstallScript" ]]; then
"$uninstallScript"
else
echo "Uninstall script not found at $uninstallScript."
fi
else
echo "Support Companion not found at $v1AppPath."
fi

exit 0