File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/bash
21
3- # Determine paths relative to script location
4- SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5- PROJECT_ROOT=" $( cd " ${SCRIPT_DIR} /.." && pwd ) "
6- PROJECT_NAME=$( basename " ${PROJECT_ROOT} " )
7-
8- # Define build directory
9- BUILD_DIR=" ${PROJECT_ROOT} /build"
10- mkdir -p " ${BUILD_DIR} "
11-
12- # Set variables
13- APP_NAME=" CopiloForXcode"
14- SCHEME_NAME=" Copilot for Xcode"
15- CONFIGURATION=" Release"
16- ARCHIVE_PATH=" ${BUILD_DIR} /Archives/${APP_NAME} .xcarchive"
17- XCWORKSPACE_PATH=" ${PROJECT_ROOT} /Copilot for Xcode.xcworkspace"
18- EXPORT_PATH=" ${BUILD_DIR} /Export"
19- EXPORT_OPTIONS_PLIST=" ${PROJECT_ROOT} /Script/export-options-local.plist"
20-
21- # Clean and build archive
22- xcodebuild \
23- -scheme " ${SCHEME_NAME} " \
24- -quiet \
25- -archivePath " ${ARCHIVE_PATH} " \
26- -configuration " ${CONFIGURATION} " \
27- -skipMacroValidation \
28- -showBuildTimingSummary \
29- -disableAutomaticPackageResolution \
30- -workspace " ${XCWORKSPACE_PATH} " -verbose -arch arm64 \
31- archive \
32- APP_VERSION=' 0.0.0'
33-
34- # Export archive to .app
35- xcodebuild -exportArchive \
36- -archivePath " ${ARCHIVE_PATH} " \
37- -exportOptionsPlist " ${EXPORT_OPTIONS_PLIST} " \
38- -exportPath " ${EXPORT_PATH} "
39-
40- echo " App packaged successfully at ${EXPORT_PATH} /${APP_NAME} .app"
41-
42- open " ${EXPORT_PATH} "
You can’t perform that action at this time.
0 commit comments