mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 13:35:19 +00:00
no message
This commit is contained in:
parent
933fb05df3
commit
1e665f1f67
2
buildbox/.gitignore
vendored
Normal file
2
buildbox/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
transient-data
|
||||
|
53
buildbox/build-telegram.sh
Normal file
53
buildbox/build-telegram.sh
Normal file
@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
BUILDBOX_DIR="buildbox"
|
||||
|
||||
mkdir -p "$BUILDBOX_DIR/transient-data"
|
||||
|
||||
BUILD_CONFIGURATION="$1"
|
||||
|
||||
if [ "$BUILD_CONFIGURATION" == "hockeyapp" ]; then
|
||||
CODESIGNING_SUBPATH="transient-data/codesigning"
|
||||
elif [ "$BUILD_CONFIGURATION" == "appstore" ]; then
|
||||
CODESIGNING_SUBPATH="transient-data/codesigning"
|
||||
elif [ "$BUILD_CONFIGURATION" == "verify" ]; then
|
||||
CODESIGNING_SUBPATH="fake-codesigning"
|
||||
else
|
||||
echo "Unknown configuration $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$BUILDBOX_DIR/$CODESIGNING_SUBPATH" ]; then
|
||||
echo "$BUILDBOX_DIR/$CODESIGNING_SUBPATH does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar czf "$BUILDBOX_DIR/transient-data/source.tar.gz" --exclude "$BUILDBOX_DIR" .
|
||||
|
||||
VM_BASE_NAME="macos10_14_3_Xcode10_1"
|
||||
|
||||
SNAPSHOT_ID=$(prlctl snapshot-list "$VM_BASE_NAME" | grep -Eo '\{(\d|[a-f]|-)*\}' | tr '\n' '\0')
|
||||
|
||||
if [ -z "$SNAPSHOT_ID" ]; then
|
||||
echo "$VM_BASE_NAME is required to have one snapshot"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VM_NAME="$VM_BASE_NAME-$(openssl rand -hex 10)"
|
||||
|
||||
prlctl clone "$VM_BASE_NAME" --name "$VM_NAME"
|
||||
prlctl snapshot-switch "$VM_NAME" -i "$SNAPSHOT_ID"
|
||||
|
||||
VM_IP=$(prlctl exec "$VM_NAME" "ifconfig | grep inet | grep broadcast | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1 | tr '\n' '\0'")
|
||||
|
||||
scp -pr "$BUILDBOX_DIR/$CODESIGNING_SUBPATH" telegram@"$VM_IP":codesigning_data
|
||||
scp -pr "$BUILDBOX_DIR/transient-data/telegram-ios-shared" telegram@"$VM_IP":telegram-ios-shared
|
||||
scp -pr "$BUILDBOX_DIR/guest-build-telegram.sh" "$BUILDBOX_DIR/transient-data/source.tar.gz" telegram@"$VM_IP":
|
||||
|
||||
ssh telegram@"$VM_IP" -o ServerAliveInterval=60 -t "bash -l guest-build-telegram.sh $BUILD_CONFIGURATION"
|
||||
|
||||
#prlctl stop "$VM_NAME" --kill
|
||||
#prlctl delete "$VM_NAME"
|
BIN
buildbox/fake-codesigning/certs/SelfSigned.p12
Normal file
BIN
buildbox/fake-codesigning/certs/SelfSigned.p12
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
43
buildbox/guest-build-telegram.sh
Normal file
43
buildbox/guest-build-telegram.sh
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" == "hockeyapp" ]; then
|
||||
FASTLANE_BUILD_CONFIGURATION="internalhockeyapp"
|
||||
elif [ "$1" == "appstore" ]; then
|
||||
FASTLANE_BUILD_CONFIGURATION="testflight_llc"
|
||||
elif [ "$1" == "verify" ]; then
|
||||
FASTLANE_BUILD_CONFIGURATION="testflight_llc"
|
||||
else
|
||||
echo "Unknown configuration $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
security unlock-keychain -p telegram
|
||||
|
||||
CERTS_PATH="codesigning_data/certs"
|
||||
for f in $(ls "$CERTS_PATH"); do
|
||||
fastlane run import_certificate "certificate_path:$CERTS_PATH/$f" keychain_name:login keychain_password:telegram log_output:true
|
||||
done
|
||||
|
||||
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
|
||||
|
||||
PROFILES_PATH="codesigning_data/profiles"
|
||||
for f in $(ls "$PROFILES_PATH"); do
|
||||
PROFILE_PATH="$PROFILES_PATH/$f"
|
||||
uuid=`grep UUID -A1 -a "$PROFILE_PATH" | grep -io "[-A-F0-9]\{36\}"`
|
||||
cp "$PROFILE_PATH" "$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
|
||||
done
|
||||
|
||||
SOURCE_PATH="source"
|
||||
|
||||
if [ -d "$SOURCE_PATH" ]; then
|
||||
echo "$SOURCE_PATH must not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$SOURCE_PATH"
|
||||
|
||||
echo "Unpacking files..."
|
||||
tar -xzf "source.tar.gz" -C "$SOURCE_PATH"
|
||||
|
||||
cd "$SOURCE_PATH"
|
||||
fastlane "$FASTLANE_BUILD_CONFIGURATION"
|
Loading…
x
Reference in New Issue
Block a user