- Add AtlasUpdateChecker with GitHub Releases API integration - Add AtlasVersionComparator for semantic version comparison - Add AboutUpdateToolbarButton with popover update UI - Enhance AboutFeatureView with social QR codes and layout refinements - Add CHANGELOG.md and CODE_OF_CONDUCT.md - Rebrand project files from Mole to Atlas for Mac - Update build script to support version/build number injection - Add installation guide to README - Add bilingual localization strings for update feature - Add unit tests for update checker and version comparator
39 lines
1.1 KiB
Bash
Executable File
39 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
PROJECT_PATH="$ROOT_DIR/Atlas.xcodeproj"
|
|
SCHEME="AtlasApp"
|
|
CONFIGURATION="${CONFIGURATION:-Release}"
|
|
DERIVED_DATA_PATH="${DERIVED_DATA_PATH:-$ROOT_DIR/.build/atlas-native/DerivedData}"
|
|
|
|
if [[ -f "$ROOT_DIR/project.yml" ]]; then
|
|
if command -v xcodegen > /dev/null 2>&1; then
|
|
(cd "$ROOT_DIR" && xcodegen generate)
|
|
elif [[ ! -d "$PROJECT_PATH" || "$ROOT_DIR/project.yml" -nt "$PROJECT_PATH/project.pbxproj" ]]; then
|
|
echo "Atlas.xcodeproj is missing or stale, but xcodegen is not installed." >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
VERSION_OVERRIDES=()
|
|
if [[ -n "${ATLAS_VERSION:-}" ]]; then
|
|
VERSION_OVERRIDES+=(MARKETING_VERSION="$ATLAS_VERSION")
|
|
fi
|
|
if [[ -n "${ATLAS_BUILD_NUMBER:-}" ]]; then
|
|
VERSION_OVERRIDES+=(CURRENT_PROJECT_VERSION="$ATLAS_BUILD_NUMBER")
|
|
fi
|
|
|
|
xcodebuild_args=(
|
|
-project "$PROJECT_PATH"
|
|
-scheme "$SCHEME"
|
|
-configuration "$CONFIGURATION"
|
|
-derivedDataPath "$DERIVED_DATA_PATH"
|
|
)
|
|
|
|
if (( ${#VERSION_OVERRIDES[@]} > 0 )); then
|
|
xcodebuild_args+=("${VERSION_OVERRIDES[@]}")
|
|
fi
|
|
|
|
xcodebuild "${xcodebuild_args[@]}" build
|