mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-05-05 12:07:28 +00:00
Update
This commit is contained in:
@@ -23,6 +23,7 @@ internal:
|
||||
- export PATH=`gem environment gemdir`/bin:$PATH
|
||||
- python3 -u build-system/Make/Make.py remote-build --darwinContainers="$DARWIN_CONTAINERS" --darwinContainersHost="$DARWIN_CONTAINERS_HOST" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath="build-system/appcenter-configuration.json" --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=adhoc --configuration=release_arm64
|
||||
- python3 -u build-system/Make/DeployToFirebase.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/firebase-configurations/firebase-internal.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
|
||||
- python3 -u build-system/Make/DeployBuild.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/deploy-configurations/internal-configuration.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
|
||||
- rm -rf build-input/configuration-repository-workdir
|
||||
- rm -rf build-input/configuration-repository
|
||||
- python3 -u build-system/Make/Make.py remote-build --darwinContainers="$DARWIN_CONTAINERS" --darwinContainersHost="$DARWIN_CONTAINERS_HOST" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath="$TELEGRAM_PRIVATE_DATA_PATH/build-configurations/enterprise-configuration.json" --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=enterprise --configuration=release_arm64
|
||||
|
||||
@@ -18,10 +18,10 @@ def sha256_file(path):
|
||||
h.update(data)
|
||||
return h.hexdigest()
|
||||
|
||||
def init_build(host, token, files):
|
||||
def init_build(host, token, files, channel):
|
||||
url = host.rstrip('/') + '/upload/init'
|
||||
headers = {"Authorization": "Bearer " + token}
|
||||
payload = {"files": files}
|
||||
payload = {"files": files, "channel": channel}
|
||||
r = requests.post(url, json=payload, headers=headers, timeout=30)
|
||||
r.raise_for_status()
|
||||
return r.json()
|
||||
@@ -77,7 +77,8 @@ if __name__ == '__main__':
|
||||
|
||||
host = config.get('host')
|
||||
token = config.get('auth_token')
|
||||
if not host or not token:
|
||||
channel = config.get('channel')
|
||||
if not host or not token or not channel:
|
||||
print('Invalid configuration')
|
||||
sys.exit(1)
|
||||
ipa_path = args.ipa
|
||||
@@ -100,7 +101,7 @@ if __name__ == '__main__':
|
||||
}
|
||||
|
||||
print('Init build')
|
||||
init = init_build(host, token, files)
|
||||
init = init_build(host, token, files, channel)
|
||||
build_id = init.get('build_id')
|
||||
urls = init.get('upload_urls', {})
|
||||
if not build_id:
|
||||
|
||||
@@ -108,6 +108,7 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
||||
case experimentalCallMute(Bool)
|
||||
case playerV2(Bool)
|
||||
case devRequests(Bool)
|
||||
case enableUpdates(Bool)
|
||||
case fakeAds(Bool)
|
||||
case enableLocalTranslation(Bool)
|
||||
case preferredVideoCodec(Int, String, String?, Bool)
|
||||
@@ -134,7 +135,7 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
||||
return DebugControllerSection.web.rawValue
|
||||
case .keepChatNavigationStack, .skipReadHistory, .alwaysDisplayTyping, .debugRatingLayout, .crashOnSlowQueries, .crashOnMemoryPressure:
|
||||
return DebugControllerSection.experiments.rawValue
|
||||
case .clearTips, .resetNotifications, .crash, .fillLocalSavedMessageCache, .resetDatabase, .resetDatabaseAndCache, .resetHoles, .resetTagHoles, .reindexUnread, .resetCacheIndex, .reindexCache, .resetBiometricsData, .optimizeDatabase, .photoPreview, .knockoutWallpaper, .compressedEmojiCache, .storiesJpegExperiment, .checkSerializedData, .enableQuickReactionSwitch, .experimentalCompatibility, .enableDebugDataDisplay, .rippleEffect, .browserExperiment, .allForumsHaveTabs, .enableReactionOverrides, .restorePurchases, .disableReloginTokens, .liveStreamV2, .experimentalCallMute, .playerV2, .devRequests, .fakeAds, .enableLocalTranslation:
|
||||
case .clearTips, .resetNotifications, .crash, .fillLocalSavedMessageCache, .resetDatabase, .resetDatabaseAndCache, .resetHoles, .resetTagHoles, .reindexUnread, .resetCacheIndex, .reindexCache, .resetBiometricsData, .optimizeDatabase, .photoPreview, .knockoutWallpaper, .compressedEmojiCache, .storiesJpegExperiment, .checkSerializedData, .enableQuickReactionSwitch, .experimentalCompatibility, .enableDebugDataDisplay, .rippleEffect, .browserExperiment, .allForumsHaveTabs, .enableReactionOverrides, .restorePurchases, .disableReloginTokens, .liveStreamV2, .experimentalCallMute, .playerV2, .devRequests, .enableUpdates, .fakeAds, .enableLocalTranslation:
|
||||
return DebugControllerSection.experiments.rawValue
|
||||
case .logTranslationRecognition, .resetTranslationStates:
|
||||
return DebugControllerSection.translation.rawValue
|
||||
@@ -261,8 +262,10 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
||||
return 56
|
||||
case .enableLocalTranslation:
|
||||
return 57
|
||||
case .enableUpdates:
|
||||
return 58
|
||||
case let .preferredVideoCodec(index, _, _, _):
|
||||
return 58 + index
|
||||
return 59 + index
|
||||
case .disableVideoAspectScaling:
|
||||
return 100
|
||||
case .enableNetworkFramework:
|
||||
@@ -1379,6 +1382,16 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
||||
})
|
||||
}).start()
|
||||
})
|
||||
case let .enableUpdates(value):
|
||||
return ItemListSwitchItem(presentationData: presentationData, title: "Enable Updates", value: value, sectionId: self.section, style: .blocks, updated: { value in
|
||||
let _ = arguments.sharedContext.accountManager.transaction ({ transaction in
|
||||
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.experimentalUISettings, { settings in
|
||||
var settings = settings?.get(ExperimentalUISettings.self) ?? ExperimentalUISettings.defaultSettings
|
||||
settings.enableUpdates = value
|
||||
return PreferencesEntry(settings)
|
||||
})
|
||||
}).start()
|
||||
})
|
||||
case let .fakeAds(value):
|
||||
return ItemListSwitchItem(presentationData: presentationData, title: "Fake Ads", value: value, sectionId: self.section, style: .blocks, updated: { value in
|
||||
let _ = arguments.sharedContext.accountManager.transaction ({ transaction in
|
||||
@@ -1561,6 +1574,7 @@ private func debugControllerEntries(sharedContext: SharedAccountContext, present
|
||||
entries.append(.devRequests(experimentalSettings.devRequests))
|
||||
entries.append(.fakeAds(experimentalSettings.fakeAds))
|
||||
entries.append(.enableLocalTranslation(experimentalSettings.enableLocalTranslation))
|
||||
entries.append(.enableUpdates(experimentalSettings.enableUpdates))
|
||||
}
|
||||
|
||||
if isMainApp {
|
||||
|
||||
@@ -2923,7 +2923,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
private func maybeCheckForUpdates() {
|
||||
#if targetEnvironment(simulator)
|
||||
#else
|
||||
guard let buildConfig = self.buildConfig, buildConfig.isInternalBuild else {
|
||||
guard let buildConfig = self.buildConfig else {
|
||||
return
|
||||
}
|
||||
let timestamp = CFAbsoluteTimeGetCurrent()
|
||||
@@ -2939,6 +2939,9 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
}
|
||||
}
|
||||
|> deliverOnMainQueue).start(next: { sharedContext, urlString in
|
||||
guard buildConfig.isInternalBuild || sharedContext.immediateExperimentalUISettings.enableUpdates else {
|
||||
return
|
||||
}
|
||||
guard let url = urlString.flatMap({ URL(string: $0) }) else {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
||||
public var checkSerializedData: Bool
|
||||
public var allForumsHaveTabs: Bool
|
||||
public var debugRatingLayout: Bool
|
||||
public var enableUpdates: Bool
|
||||
|
||||
public static var defaultSettings: ExperimentalUISettings {
|
||||
return ExperimentalUISettings(
|
||||
@@ -115,7 +116,8 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
||||
conferenceDebug: false,
|
||||
checkSerializedData: false,
|
||||
allForumsHaveTabs: false,
|
||||
debugRatingLayout: false
|
||||
debugRatingLayout: false,
|
||||
enableUpdates: false
|
||||
)
|
||||
}
|
||||
|
||||
@@ -163,7 +165,8 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
||||
conferenceDebug: Bool,
|
||||
checkSerializedData: Bool,
|
||||
allForumsHaveTabs: Bool,
|
||||
debugRatingLayout: Bool
|
||||
debugRatingLayout: Bool,
|
||||
enableUpdates: Bool
|
||||
) {
|
||||
self.keepChatNavigationStack = keepChatNavigationStack
|
||||
self.skipReadHistory = skipReadHistory
|
||||
@@ -209,6 +212,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
||||
self.checkSerializedData = checkSerializedData
|
||||
self.allForumsHaveTabs = allForumsHaveTabs
|
||||
self.debugRatingLayout = debugRatingLayout
|
||||
self.enableUpdates = enableUpdates
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
@@ -258,6 +262,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
||||
self.checkSerializedData = try container.decodeIfPresent(Bool.self, forKey: "checkSerializedData") ?? false
|
||||
self.allForumsHaveTabs = try container.decodeIfPresent(Bool.self, forKey: "allForumsHaveTabs") ?? false
|
||||
self.debugRatingLayout = try container.decodeIfPresent(Bool.self, forKey: "debugRatingLayout") ?? false
|
||||
self.enableUpdates = try container.decodeIfPresent(Bool.self, forKey: "enableUpdates") ?? false
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
@@ -307,6 +312,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
||||
try container.encodeIfPresent(self.checkSerializedData, forKey: "checkSerializedData")
|
||||
try container.encodeIfPresent(self.allForumsHaveTabs, forKey: "allForumsHaveTabs")
|
||||
try container.encodeIfPresent(self.debugRatingLayout, forKey: "debugRatingLayout")
|
||||
try container.encodeIfPresent(self.enableUpdates, forKey: "enableUpdates")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user