diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index f027a909c..a63844bb7 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -148,9 +148,9 @@ class CoreContext: ObservableObject { self.mCore.callkitEnabled = true self.mCore.pushNotificationEnabled = true - let appGitVersion = APP_GIT_COMMIT - let appGitBranch = APP_GIT_BRANCH - let appGitTag = APP_GIT_TAG + let appGitVersion = AppGitInfo.commit + let appGitBranch = AppGitInfo.branch + let appGitTag = AppGitInfo.tag let sdkGitVersion = linphonesw.sdkVersion var sdkGitBranch = linphonesw.sdkBranch diff --git a/Linphone/GeneratedGit.swift b/Linphone/GeneratedGit.swift index 39d0efc36..8319ee0e5 100644 --- a/Linphone/GeneratedGit.swift +++ b/Linphone/GeneratedGit.swift @@ -1,5 +1,7 @@ import Foundation -public let APP_GIT_BRANCH = "master" -public let APP_GIT_COMMIT = "fe8432f12" -public let APP_GIT_TAG = "6.1.0-alpha" +public enum AppGitInfo { + public static let branch = "master" + public static let commit = "33b379285" + public static let tag = "6.1.0-alpha" +} diff --git a/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift b/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift index f8d71ad84..97ce95fbc 100644 --- a/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift +++ b/Linphone/UI/Main/Help/ViewModel/HelpViewModel.swift @@ -38,9 +38,9 @@ class HelpViewModel: ObservableObject { private var coreDelegate: CoreDelegate? init() { - let appGitVersion = APP_GIT_COMMIT - let appGitBranch = APP_GIT_BRANCH - let appGitTag = APP_GIT_TAG + let appGitVersion = AppGitInfo.commit + let appGitBranch = AppGitInfo.branch + let appGitTag = AppGitInfo.tag let sdkGitVersion = linphonesw.sdkVersion var sdkGitBranch = linphonesw.sdkBranch diff --git a/LinphoneApp.xcodeproj/project.pbxproj b/LinphoneApp.xcodeproj/project.pbxproj index 7869b3e43..6319aee97 100644 --- a/LinphoneApp.xcodeproj/project.pbxproj +++ b/LinphoneApp.xcodeproj/project.pbxproj @@ -1256,7 +1256,7 @@ D7D5AD7B2DD34E4D00016721 /* XCRemoteSwiftPackageReference "AppAuth-iOS" */, D7D5AD7C2DD34E7C00016721 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, D7DF8BE42E2104D0003A3BC7 /* XCRemoteSwiftPackageReference "Elegant-Emoji-Picker" */, - D7D1F5482EDDD8D30034EEB0 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */, + D73DD7FF2EE6FF6A00654313 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */, ); productRefGroup = D719ABB42ABC67BF00B41C10 /* Products */; projectDirPath = ""; @@ -1344,7 +1344,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n#!/bin/bash\n\nbranch=$(git rev-parse --abbrev-ref HEAD)\ncommit=$(git rev-parse --short HEAD)\ntag=$(git describe --tags --abbrev=0 2>/dev/null || echo \"no-tag\")\n\ncat < \"$SRCROOT/Linphone/GeneratedGit.swift\"\nimport Foundation\n\npublic let APP_GIT_BRANCH = \"$branch\"\npublic let APP_GIT_COMMIT = \"$commit\"\npublic let APP_GIT_TAG = \"$tag\"\nEOF\n"; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n#!/bin/bash\n\nbranch=$(git symbolic-ref --short HEAD 2>/dev/null || echo \"detached\")\ncommit=$(git rev-parse --short HEAD)\ntag=$(git describe --tags --exact-match 2>/dev/null || git describe --tags --abbrev=0 2>/dev/null || echo \"no-tag\")\n\ncat < \"$SRCROOT/Linphone/GeneratedGit.swift\"\nimport Foundation\n\npublic enum AppGitInfo {\n public static let branch = \"$branch\"\n public static let commit = \"$commit\"\n public static let tag = \"$tag\"\n}\nEOF\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -2037,7 +2037,7 @@ kind = branch; }; }; - D7D1F5482EDDD8D30034EEB0 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */ = { + D73DD7FF2EE6FF6A00654313 /* XCRemoteSwiftPackageReference "linphone-sdk-swift-ios" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://gitlab.linphone.org/BC/public/linphone-sdk-swift-ios.git"; requirement = {