mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Hopefully actually fix git branch info
This commit is contained in:
parent
db9d0b420f
commit
8523246aea
3 changed files with 8 additions and 16 deletions
|
@ -26,7 +26,7 @@ fi
|
|||
|
||||
if [ $# == 0 ]
|
||||
then
|
||||
$basecmd -archivePath "out/matrixConsole.xcarchive" archive $vars
|
||||
$basecmd -archivePath "out/matrixConsole.xcarchive" archive GCC_PREPROCESSOR_DEFINITIONS="\$(GCC_PREPROCESSOR_DEFINITIONS) $vars"
|
||||
xcrun -sdk $sdk PackageApplication -v $outdir/matrixConsole.xcarchive/Products/Applications/matrixConsole.app -o `pwd`/out/matrixConsole.ipa
|
||||
elif [ $1 == 'clean' ]
|
||||
then
|
||||
|
|
|
@ -702,7 +702,6 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUILD_NUMBER = 0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -725,8 +724,6 @@
|
|||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
"MACRO_BUILD_NUMBER=$(BUILD_NUMBER)",
|
||||
"MACRO_GIT_BRANCH=$(GIT_BRANCH)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
|
@ -735,7 +732,6 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GIT_BRANCH = 0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
@ -748,7 +744,6 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUILD_NUMBER = 0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -768,8 +763,6 @@
|
|||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"MACRO_BUILD_NUMBER=$(BUILD_NUMBER)",
|
||||
"MACRO_GIT_BRANCH=$(GIT_BRANCH)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
|
@ -777,7 +770,6 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GIT_BRANCH = 0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#import "SettingsViewController.h"
|
||||
#import "ContactManager.h"
|
||||
|
||||
#define NSStringize_helper(x) #x
|
||||
#define NSStringize(x) @NSStringize_helper(x)
|
||||
#define MAKE_STRING(x) #x
|
||||
#define MAKE_NS_STRING(x) @MAKE_STRING(x)
|
||||
|
||||
@interface AppDelegate () <UISplitViewControllerDelegate>
|
||||
|
||||
|
@ -53,18 +53,18 @@
|
|||
NSString *buildBranch = nil;
|
||||
NSString *buildNumber = nil;
|
||||
// Check whether GIT_BRANCH and BUILD_NUMBER were provided during compilation in command line argument.
|
||||
#if MACRO_GIT_BRANCH
|
||||
buildBranch = NSStringize(MACRO_GIT_BRANCH);
|
||||
#ifdef GIT_BRANCH
|
||||
buildBranch = MAKE_NS_STRING(GIT_BRANCH);
|
||||
#endif
|
||||
#if MACRO_BUILD_NUMBER
|
||||
buildNumber = [NSString stringWithFormat:@"#%d", MACRO_BUILD_NUMBER];
|
||||
#ifdef BUILD_NUMBER
|
||||
buildNumber = [NSString stringWithFormat:@"#%d", BUILD_NUMBER];
|
||||
#endif
|
||||
if (buildBranch && buildNumber) {
|
||||
_build = [NSString stringWithFormat:@"%@ %@", buildBranch, buildNumber];
|
||||
} else if (buildNumber){
|
||||
_build = buildNumber;
|
||||
} else {
|
||||
_build = buildBranch ? buildBranch : @"";
|
||||
_build = buildBranch ? buildBranch : @"(no build info)";
|
||||
}
|
||||
}
|
||||
return _build;
|
||||
|
|
Loading…
Reference in a new issue