mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Add a packageRelease.sh script to help automate the generation of release assets
This commit is contained in:
parent
cec8fd884a
commit
6b9b36d6ee
3 changed files with 34 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -29,6 +29,8 @@ DerivedData/
|
|||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
Archive/*
|
||||
Product/*
|
||||
|
||||
## Playgrounds
|
||||
timeline.xctimeline
|
||||
|
|
|
|||
8
Scripts/export_options.plist
Normal file
8
Scripts/export_options.plist
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>developer-id</string>
|
||||
</dict>
|
||||
</plist>
|
||||
24
Scripts/package_release.sh
Executable file
24
Scripts/package_release.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Package release
|
||||
#
|
||||
# This will build and archive the app and then compress it in a .zip file
|
||||
# You must already have all required code signing assets installed on your computer
|
||||
|
||||
PROJECT_NAME=Xcodes
|
||||
PROJECT_DIR=$(pwd)/$PROJECT_NAME/Resources
|
||||
SCRIPTS_DIR=$(pwd)/Scripts
|
||||
INFOPLIST_FILE="Info.plist"
|
||||
|
||||
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
|
||||
CFBundleShortVersionString=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${PROJECT_DIR}/${INFOPLIST_FILE}")
|
||||
|
||||
# Ensure a clean build
|
||||
rm -rf Archive/*
|
||||
rm -rf Product/*
|
||||
xcodebuild clean -project $PROJECT_NAME.xcodeproj -configuration Release -alltargets
|
||||
|
||||
# Archive the app and export for release distribution
|
||||
xcodebuild archive -project $PROJECT_NAME.xcodeproj -scheme $PROJECT_NAME -archivePath Archive/$PROJECT_NAME.xcarchive
|
||||
xcodebuild -archivePath Archive/$PROJECT_NAME.xcarchive -exportArchive -exportPath Product/$PROJECT_NAME.app -exportOptionsPlist "${SCRIPTS_DIR}/export_options.plist"
|
||||
zip -r "Product/$PROJECT_NAME.v${CFBundleShortVersionString}.b${CFBundleVersion}.zip" Product/$PROJECT_NAME.app
|
||||
Loading…
Reference in a new issue