Xcarchive is a simple command-line util to package ios and upload pgy.
SDKROOT=(xcrun --sdk macosx --show-sdk-path)
> git clone https://github.com/wangteng/Xcarchive.git
> cd Xcarchive
> swift build -c release
# Then copy the executable to your PATH, such as `/usr/local/bin`
> sudo cp .build/release/Xcarchive /usr/local/bin/xcarchive
Xcarchive should be compiled, tested and installed into the /usr/local/bin
.
Just navigate to your project folder, then:
> xcarchive
Configuation
in Main.swift
struct KeyConfiguation {
/// 企业微信机器人webhook地追
static let robotURL = ""
/// 上传蒲公英key
static let pgyKey = ""
}
Xcarchive supports some arguments. You can find it by:
> xcarchive --help
Usage: ./xcarchive [options]
-p, --project:
Root path of your Xcode project
-o, --output:
Package path. Default is current project path /xcarchive
-c, --configuration:
The name of pbxproj buildConfigurations. Default is Release
--version:
Print version.
-h, --help:
Print this help message.