diff --git a/scripts/build.sh b/scripts/build.sh old mode 100644 new mode 100755 index ef2a7e8..f4c4756 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,28 +1,22 @@ -#!/bin/bash +#!/usr/bin/env bash +set -euo pipefail + cd /Volumes/Developer/Applications/DbSyn -&& rm -rf ./build -&& -xcodebuild --project -DBSyn.xcodeproj --scheme -DBSyn --configuration -Debug --destination -'platform=macOS,arch=arm64' --derivedDataPath -./build -clean -build -&& -{ -pkill --x -DBSyn -2>/dev/null -|| -true; -open -./build/Build/Products/Debug/DBSyn.app; -} \ No newline at end of file + +# Remove previous build +rm -rf ./build + +# Clean and build DBSyn +xcodebuild \ + -project DBSyn.xcodeproj \ + -scheme DBSyn \ + -configuration Debug \ + -destination 'platform=macOS,arch=arm64' \ + -derivedDataPath ./build \ + clean build + +# Stop any running instance +pkill -x DBSyn 2>/dev/null || true + +# Launch the newly built application +open ./build/Build/Products/Debug/DBSyn.app \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index 7d47afe..3c1d085 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -105,7 +105,7 @@ ditto "$APP_PATH" "$DMG_STAGE/$APP_NAME.app" ln -s /Applications "$DMG_STAGE/Applications" # Create writable image first: the custom volume icon must be set ON the # mounted filesystem, not on the staging directory. -hdiutil create -size 100m -fs HFS+ -volname "$APP_NAME" -format UDRW -ov "$RW_DMG" +hdiutil create -size 100m -fs HFS+ -volname "$APP_NAME" -ov "$RW_DMG" MOUNTED=0 cleanup() { if [[ "$MOUNTED" == 1 ]]; then hdiutil detach "$MOUNT_POINT" -quiet || true; fi