Skip to content

Instantly share code, notes, and snippets.

@MrModest
Created September 24, 2026 18:12
Show Gist options
  • Select an option

  • Save MrModest/db42be94ba85260941b3f15ce2acb9ab to your computer and use it in GitHub Desktop.

Select an option

Save MrModest/db42be94ba85260941b3f15ce2acb9ab to your computer and use it in GitHub Desktop.
Example of [justfile](https://just.systems/man/en/)
scheme := "CalSync"
config := "Release"
install_dir := env("HOME") / "Applications"
app_name := "CalSync.app"
# Default: build and install
default: install
# Build the app (ad-hoc signed for local use)
build:
xcodebuild -scheme {{scheme}} -configuration {{config}} build
# Clean build
clean-build:
xcodebuild -scheme {{scheme}} -configuration {{config}} clean build
# Run tests
test:
xcodebuild -scheme {{scheme}} -configuration Debug test
# Kill running app, build, and install to ~/Applications
install: build
-pkill -x CalSync
sleep 1
mkdir -p {{install_dir}}
rm -rf {{install_dir}}/{{app_name}}
cp -R $(xcodebuild -scheme {{scheme}} -configuration {{config}} \
-showBuildSettings 2>/dev/null | grep -m1 'BUILT_PRODUCTS_DIR' | \
awk '{print $3}')/{{app_name}} {{install_dir}}/
@echo "Installed to {{install_dir}}/{{app_name}}"
# Install and launch
run: install
open {{install_dir}}/{{app_name}}
# Regenerate Xcode project from project.yml
generate:
xcodegen generate
# Clean derived data
clean:
xcodebuild -scheme {{scheme}} clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment