From ce5904092d327584e2041f38b69bcae3be68ac14 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Fri, 26 Oct 2018 21:04:21 +0000 Subject: [PATCH 01/17] Package non-system libraries inside the framework This automatically copies libssl & libcrypto inside our framework bundle. --- .../project.pbxproj | 15 +++ script/repackage-dylibs.rb | 110 ++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100755 script/repackage-dylibs.rb diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 66b9339a3..5043f44c4 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -1225,6 +1225,7 @@ 79262F0F13C697BE00A4B1EA /* Copy git2 Headers */, BEF7E4DF1A3A47450035BB8E /* Copy git2 Headers again */, 8DC2EF500486A6940098B216 /* Headers */, + 4D751E9D215D765D003CD3CE /* Package external libraries */, ); buildRules = ( ); @@ -1356,6 +1357,20 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 4D751E9D215D765D003CD3CE /* Package external libraries */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Package external libraries"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "./script/repackage-dylibs.rb"; + }; 6A28265317C69CB400C6A948 /* OpenSSL-iOS */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/script/repackage-dylibs.rb b/script/repackage-dylibs.rb new file mode 100755 index 000000000..c594a76ac --- /dev/null +++ b/script/repackage-dylibs.rb @@ -0,0 +1,110 @@ +#!/usr/bin/ruby + +# This script looks up an executable's list of shared libraries, copies +# non-standard ones (ie. anything not under /usr or /System/) into the target's +# bundle and updates the executable install_name to point to the "packaged" +# version. + +# Usage: +# Add the script as a Run Script build phase in the target using Xcode. + +# FIXMEs: +# - only handles dylibs +# - only tested against a framework target +# - doesn't care about codesigning + + +require 'fileutils' +require 'ostruct' + +def err(msg) + puts "error: " + msg + exit 1 +end + +def warn(msg) + puts "warning: " + msg +end + +def note(msg) + puts "note: " + msg +end + +envvars = %w( + TARGET_BUILD_DIR + EXECUTABLE_PATH + FRAMEWORKS_FOLDER_PATH +) + +envvars.each do |var| + raise "Must be run in an Xcode Run Phase" unless ENV[var] + Kernel.const_set var, ENV[var] +end + +TARGET_EXECUTABLE_PATH = File.join(TARGET_BUILD_DIR, EXECUTABLE_PATH) +TARGET_FRAMEWORKS_PATH = File.join(TARGET_BUILD_DIR, FRAMEWORKS_FOLDER_PATH) + +def extract_link_dependencies + deps = `otool -L #{TARGET_EXECUTABLE_PATH}` + + lines = deps.split("\n").map(&:strip) + lines.shift + lines.shift + lines.map do |dep| + path, compat, current = /^(.*) \(compatibility version (.*), current version (.*)\)$/.match(dep)[1..3] + err "Failed to parse #{dep}" if path.nil? + + dep = OpenStruct.new + dep.install_name = path + dep.current_version = current + dep.compat_version = compat + dep.type = File.extname(path) + dep.name = File.basename(path) + dep.is_packaged = (dep.install_name =~ /^@rpath/) + dep.path = if dep.install_name =~ /^@rpath/ + File.join(TARGET_FRAMEWORKS_PATH, dep.name) + else + dep.install_name + end + + dep + end +end + +def repackage_dependency(dep) + return if dep.is_packaged or dep.path =~ /^(\/usr\/lib|\/System\/Library)/ + + note "Packaging #{dep.name}…" + + FileUtils.mkdir(TARGET_FRAMEWORKS_PATH) unless Dir.exist?(TARGET_FRAMEWORKS_PATH) + + case dep.type + when ".dylib" + if File.exist?(File.join(TARGET_FRAMEWORKS_PATH, dep.name)) + warn "#{dep.path} already in Frameworks directory, removing" + FileUtils.rm File.join(TARGET_FRAMEWORKS_PATH, dep.name) + end + + note "Copying #{dep[:path]} to TARGET_FRAMEWORKS_PATH" + FileUtils.cp dep[:path], TARGET_FRAMEWORKS_PATH + + out = `install_name_tool -change #{dep.path} "@rpath/#{dep.name}" #{TARGET_EXECUTABLE_PATH}` + if $? != 0 + err "install_name_tool failed with error #{$?}:\n#{out}" + end + + dep.path = File.join(TARGET_FRAMEWORKS_PATH, dep.name) + dep.install_name = "@rpath/#{dep.name}" + dep.is_packaged = true + + else + warn "Unhandled type #{dep.type} for #{dep.path}, ignoring" + end +end + +extract_link_dependencies.each do |dep| + repackage_dependency dep +end + +note "Packaging done" +exit 0 From cfb487c421ab65b3f04904a0d41aff44adcd8a36 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Sun, 18 Nov 2018 17:15:40 +0100 Subject: [PATCH 02/17] Fix nullability warnings introduced in Xcode 10 --- ObjectiveGit/GTBlameHunk.m | 4 +++- ObjectiveGit/GTConfiguration.m | 5 ++++- ObjectiveGit/GTDiffFile.m | 5 +++-- ObjectiveGit/GTFilterSource.m | 11 +++++++---- ObjectiveGit/GTIndexEntry.m | 4 +++- ObjectiveGit/GTNote.m | 4 +++- ObjectiveGit/GTReference.m | 8 +++++--- ObjectiveGit/GTRepository+RemoteOperations.m | 10 ++++++++-- ObjectiveGit/GTRepository.m | 20 +++++++++++++------- ObjectiveGit/GTSubmodule.m | 15 ++++++++++++--- ObjectiveGit/GTTag.m | 8 ++++++-- ObjectiveGit/GTTreeEntry.m | 4 +++- 12 files changed, 70 insertions(+), 28 deletions(-) diff --git a/ObjectiveGit/GTBlameHunk.m b/ObjectiveGit/GTBlameHunk.m index 3be7dd4da..9c136fc70 100644 --- a/ObjectiveGit/GTBlameHunk.m +++ b/ObjectiveGit/GTBlameHunk.m @@ -39,7 +39,9 @@ - (GTSignature *)finalSignature { } - (NSString *)originalPath { - return @(self.git_blame_hunk.orig_path); + NSString *path = @(self.git_blame_hunk.orig_path); + NSAssert(path, @"string was nil"); + return path; } - (BOOL)isBoundary { diff --git a/ObjectiveGit/GTConfiguration.m b/ObjectiveGit/GTConfiguration.m index 940753cf9..acd46cd74 100644 --- a/ObjectiveGit/GTConfiguration.m +++ b/ObjectiveGit/GTConfiguration.m @@ -112,7 +112,10 @@ - (BOOL)deleteValueForKey:(NSString *)key error:(NSError **)error { static int configCallback(const git_config_entry *entry, void *payload) { NSMutableArray *configurationKeysArray = (__bridge NSMutableArray *)payload; - [configurationKeysArray addObject:@(entry->name)]; + NSString *name = @(entry->name); + NSCAssert(name, @"string was nil"); + + [configurationKeysArray addObject:name]; return 0; } diff --git a/ObjectiveGit/GTDiffFile.m b/ObjectiveGit/GTDiffFile.m index 135f758a0..24b3c7b11 100644 --- a/ObjectiveGit/GTDiffFile.m +++ b/ObjectiveGit/GTDiffFile.m @@ -22,8 +22,9 @@ - (instancetype)initWithGitDiffFile:(git_diff_file)file { self = [super init]; if (self == nil) return nil; - _path = @(file.path); - if (_path == nil) return nil; + NSString *path = @(file.path); + if (path == nil) return nil; + _path = path; _git_diff_file = file; _size = (NSUInteger)file.size; diff --git a/ObjectiveGit/GTFilterSource.m b/ObjectiveGit/GTFilterSource.m index 91de241b3..65878319f 100644 --- a/ObjectiveGit/GTFilterSource.m +++ b/ObjectiveGit/GTFilterSource.m @@ -27,10 +27,13 @@ - (instancetype)initWithGitFilterSource:(const git_filter_source *)source { self = [super init]; if (self == nil) return nil; - const char *path = git_repository_workdir(git_filter_source_repo(source)); - _repositoryURL = [NSURL fileURLWithPath:@(path)]; - - _path = @(git_filter_source_path(source)); + NSString *path = @(git_repository_workdir(git_filter_source_repo(source))); + NSAssert(path, @"workdir was nil"); + _repositoryURL = [NSURL fileURLWithPath:path]; + + path = @(git_filter_source_path(source)); + NSAssert(path, @"path was nil"); + _path = path; const git_oid *gitOid = git_filter_source_id(source); if (gitOid != NULL) _OID = [[GTOID alloc] initWithGitOid:gitOid]; diff --git a/ObjectiveGit/GTIndexEntry.m b/ObjectiveGit/GTIndexEntry.m index a218ed398..855393c3d 100644 --- a/ObjectiveGit/GTIndexEntry.m +++ b/ObjectiveGit/GTIndexEntry.m @@ -74,7 +74,9 @@ - (instancetype)initWithGitIndexEntry:(const git_index_entry *)entry { #pragma mark Properties - (NSString *)path { - return @(self.git_index_entry->path); + NSString *path = @(self.git_index_entry->path); + NSAssert(path, @"path is nil"); + return path; } - (int)flags { diff --git a/ObjectiveGit/GTNote.m b/ObjectiveGit/GTNote.m index 0c18fe2b5..4562b0845 100644 --- a/ObjectiveGit/GTNote.m +++ b/ObjectiveGit/GTNote.m @@ -42,7 +42,9 @@ - (git_note *)git_note { } - (NSString *)note { - return @(git_note_message(self.git_note)); + NSString *message = @(git_note_message(self.git_note)); + NSAssert(message, @"message is nil"); + return message; } - (GTSignature *)author { diff --git a/ObjectiveGit/GTReference.m b/ObjectiveGit/GTReference.m index bdb0fb13a..2baacdacb 100644 --- a/ObjectiveGit/GTReference.m +++ b/ObjectiveGit/GTReference.m @@ -118,10 +118,12 @@ - (BOOL)isNote { } - (NSString *)name { - const char *refName = git_reference_name(self.git_reference); - NSAssert(refName != nil, @"Unexpected nil name"); + const char *cRefName = git_reference_name(self.git_reference); + NSAssert(cRefName != nil, @"Unexpected nil name"); - return @(refName); + NSString *refName = @(cRefName); + NSAssert(refName, @"refname is nil"); + return refName; } - (GTReference *)referenceByRenaming:(NSString *)newName error:(NSError **)error { diff --git a/ObjectiveGit/GTRepository+RemoteOperations.m b/ObjectiveGit/GTRepository+RemoteOperations.m index 57c92096a..822171ab9 100644 --- a/ObjectiveGit/GTRepository+RemoteOperations.m +++ b/ObjectiveGit/GTRepository+RemoteOperations.m @@ -126,9 +126,15 @@ int GTFetchHeadEntriesCallback(const char *ref_name, const char *remote_url, con GTRepository *repository = entriesPayload->repository; GTRemoteEnumerateFetchHeadEntryBlock enumerationBlock = entriesPayload->enumerationBlock; - GTReference *reference = [repository lookUpReferenceWithName:@(ref_name) error:NULL]; + NSString *refName = @(ref_name); + NSCAssert(refName, @"refName is nil"); - GTFetchHeadEntry *entry = [[GTFetchHeadEntry alloc] initWithReference:reference remoteURLString:@(remote_url) targetOID:[GTOID oidWithGitOid:oid] isMerge:(BOOL)is_merge]; + NSString *remoteURL = @(remote_url); + NSCAssert(remote_url, @"remoteURL is nil"); + + GTReference *reference = [repository lookUpReferenceWithName:refName error:NULL]; + + GTFetchHeadEntry *entry = [[GTFetchHeadEntry alloc] initWithReference:reference remoteURLString:remoteURL targetOID:[GTOID oidWithGitOid:oid] isMerge:(BOOL)is_merge]; BOOL stop = NO; diff --git a/ObjectiveGit/GTRepository.m b/ObjectiveGit/GTRepository.m index dde113c2c..851d81c28 100644 --- a/ObjectiveGit/GTRepository.m +++ b/ObjectiveGit/GTRepository.m @@ -637,18 +637,22 @@ - (NSArray *)referenceNamesWithError:(NSError **)error { } - (NSURL *)fileURL { - const char *path = git_repository_workdir(self.git_repository); + const char *cPath = git_repository_workdir(self.git_repository); // bare repository, you may be looking for gitDirectoryURL - if (path == NULL) return nil; + if (cPath == NULL) return nil; - return [NSURL fileURLWithPath:@(path) isDirectory:YES]; + NSString *path = @(cPath); + NSAssert(path, @"workdir is nil"); + return [NSURL fileURLWithPath:path isDirectory:YES]; } - (NSURL *)gitDirectoryURL { - const char *path = git_repository_path(self.git_repository); - if (path == NULL) return nil; + const char *cPath = git_repository_path(self.git_repository); + if (cPath == NULL) return nil; - return [NSURL fileURLWithPath:@(path) isDirectory:YES]; + NSString *path = @(cPath); + NSAssert(path, @"gitdirectory is nil"); + return [NSURL fileURLWithPath:path isDirectory:YES]; } - (BOOL)isBare { @@ -737,7 +741,9 @@ static int submoduleEnumerationCallback(git_submodule *git_submodule, const char NSError *error; // Use -submoduleWithName:error: so that we get a git_submodule that we own. - GTSubmodule *submodule = [info->parentRepository submoduleWithName:@(name) error:&error]; + NSString *submoduleName = @(name); + NSCAssert(submoduleName, @"submodule name is nil"); + GTSubmodule *submodule = [info->parentRepository submoduleWithName:submoduleName error:&error]; BOOL stop = NO; info->block(submodule, error, &stop); diff --git a/ObjectiveGit/GTSubmodule.m b/ObjectiveGit/GTSubmodule.m index 968920d83..5d61b20c2 100644 --- a/ObjectiveGit/GTSubmodule.m +++ b/ObjectiveGit/GTSubmodule.m @@ -62,21 +62,30 @@ - (NSString *)name { const char *cName = git_submodule_name(self.git_submodule); NSAssert(cName != NULL, @"Unexpected nil submodule name"); - return @(cName); + NSString *name = @(cName); + NSAssert(name, @"name is nil"); + + return name; } - (NSString *)path { const char *cPath = git_submodule_path(self.git_submodule); NSAssert(cPath != NULL, @"Unexpected nil submodule path"); - return @(cPath); + NSString *path = @(cPath); + NSAssert(path, @"message is nil"); + + return path; } - (NSString *)URLString { const char *cURL = git_submodule_url(self.git_submodule); NSAssert(cURL != NULL, @"Unexpected nil submodule URL"); - return @(cURL); + NSString *URL = @(cURL); + NSAssert(URL, @"URL is nil"); + + return URL; } #pragma mark Lifecycle diff --git a/ObjectiveGit/GTTag.m b/ObjectiveGit/GTTag.m index 3c8c617c8..e2cd31a94 100644 --- a/ObjectiveGit/GTTag.m +++ b/ObjectiveGit/GTTag.m @@ -47,11 +47,15 @@ - (NSString *)description { #pragma mark API - (NSString *)message { - return @(git_tag_message(self.git_tag)); + NSString *message = @(git_tag_message(self.git_tag)); + NSAssert(message, @"message is nil"); + return message; } - (NSString *)name { - return @(git_tag_name(self.git_tag)); + NSString *name = @(git_tag_name(self.git_tag)); + NSAssert(name, @"message is nil"); + return name; } - (GTObject *)target { diff --git a/ObjectiveGit/GTTreeEntry.m b/ObjectiveGit/GTTreeEntry.m index 809ae0eae..946b1f06f 100644 --- a/ObjectiveGit/GTTreeEntry.m +++ b/ObjectiveGit/GTTreeEntry.m @@ -94,7 +94,9 @@ + (instancetype)entryWithEntry:(const git_tree_entry *)theEntry parentTree:(GTTr } - (NSString *)name { - return @(git_tree_entry_name(self.git_tree_entry)); + NSString *name = @(git_tree_entry_name(self.git_tree_entry)); + NSAssert(name, @"name was nil"); + return name; } - (NSInteger)attributes { From 7966189f48e4c4598ae14d29854d6b6d8d6d550e Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Tue, 20 Nov 2018 21:33:54 +0100 Subject: [PATCH 03/17] Also fixup dependencies names & ids --- script/repackage-dylibs.rb | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/script/repackage-dylibs.rb b/script/repackage-dylibs.rb index c594a76ac..6f2a34719 100755 --- a/script/repackage-dylibs.rb +++ b/script/repackage-dylibs.rb @@ -44,23 +44,25 @@ def note(msg) TARGET_EXECUTABLE_PATH = File.join(TARGET_BUILD_DIR, EXECUTABLE_PATH) TARGET_FRAMEWORKS_PATH = File.join(TARGET_BUILD_DIR, FRAMEWORKS_FOLDER_PATH) -def extract_link_dependencies - deps = `otool -L #{TARGET_EXECUTABLE_PATH}` +def extract_link_dependencies(executable) + deps = `otool -L #{executable}` lines = deps.split("\n").map(&:strip) lines.shift - lines.shift + # lines.shift lines.map do |dep| path, compat, current = /^(.*) \(compatibility version (.*), current version (.*)\)$/.match(dep)[1..3] err "Failed to parse #{dep}" if path.nil? dep = OpenStruct.new + dep.is_self = (File.basename(path) == File.basename(executable)) + dep.executable = executable dep.install_name = path dep.current_version = current dep.compat_version = compat dep.type = File.extname(path) dep.name = File.basename(path) - dep.is_packaged = (dep.install_name =~ /^@rpath/) + dep.is_packaged = !!(dep.install_name =~ /^@rpath/) dep.path = if dep.install_name =~ /^@rpath/ File.join(TARGET_FRAMEWORKS_PATH, dep.name) else @@ -72,7 +74,7 @@ def extract_link_dependencies end def repackage_dependency(dep) - return if dep.is_packaged or dep.path =~ /^(\/usr\/lib|\/System\/Library)/ + return if dep.is_self or dep.is_packaged or dep.path =~ /^(\/usr\/lib|\/System\/Library)/ note "Packaging #{dep.name}…" @@ -88,7 +90,7 @@ def repackage_dependency(dep) note "Copying #{dep[:path]} to TARGET_FRAMEWORKS_PATH" FileUtils.cp dep[:path], TARGET_FRAMEWORKS_PATH - out = `install_name_tool -change #{dep.path} "@rpath/#{dep.name}" #{TARGET_EXECUTABLE_PATH}` + out = `install_name_tool -change #{dep.path} "@rpath/#{dep.name}" #{dep.executable}` if $? != 0 err "install_name_tool failed with error #{$?}:\n#{out}" end @@ -96,14 +98,24 @@ def repackage_dependency(dep) dep.path = File.join(TARGET_FRAMEWORKS_PATH, dep.name) dep.install_name = "@rpath/#{dep.name}" dep.is_packaged = true - else warn "Unhandled type #{dep.type} for #{dep.path}, ignoring" end end -extract_link_dependencies.each do |dep| +def fix_install_id(dep) + note "Fixing #{dep.name} install_name id…" + out = `install_name_tool -id @rpath/#{dep.name} #{dep.executable}` + if $? != 0 + err "install_name_tool failed with error #{$?}:\n#{out}" + end +end + +deps = extract_link_dependencies(TARGET_EXECUTABLE_PATH) +while (dep = deps.shift) do repackage_dependency dep + fix_install_id dep if dep.is_self and dep.executable != TARGET_EXECUTABLE_PATH + deps += extract_link_dependencies(dep[:path]) if dep.is_packaged and not dep.is_self end note "Packaging done" From da034f6e7e82f2c4fae17488b08dd4154b60c974 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Mon, 28 Jan 2019 17:56:41 +0100 Subject: [PATCH 04/17] Fix permissions while packaging binaries --- script/repackage-dylibs.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script/repackage-dylibs.rb b/script/repackage-dylibs.rb index 6f2a34719..f6b35a300 100755 --- a/script/repackage-dylibs.rb +++ b/script/repackage-dylibs.rb @@ -79,23 +79,25 @@ def repackage_dependency(dep) note "Packaging #{dep.name}…" FileUtils.mkdir(TARGET_FRAMEWORKS_PATH) unless Dir.exist?(TARGET_FRAMEWORKS_PATH) + packaged_path = File.join(TARGET_FRAMEWORKS_PATH, dep.name) case dep.type when ".dylib" - if File.exist?(File.join(TARGET_FRAMEWORKS_PATH, dep.name)) + if File.exist? packaged_path warn "#{dep.path} already in Frameworks directory, removing" - FileUtils.rm File.join(TARGET_FRAMEWORKS_PATH, dep.name) + FileUtils.rm packaged_path end note "Copying #{dep[:path]} to TARGET_FRAMEWORKS_PATH" FileUtils.cp dep[:path], TARGET_FRAMEWORKS_PATH + FileUtils.chmod "u=rw", packaged_path out = `install_name_tool -change #{dep.path} "@rpath/#{dep.name}" #{dep.executable}` if $? != 0 err "install_name_tool failed with error #{$?}:\n#{out}" end - dep.path = File.join(TARGET_FRAMEWORKS_PATH, dep.name) + dep.path = packaged_path dep.install_name = "@rpath/#{dep.name}" dep.is_packaged = true else From a9cd846cfdedaaa389bc5ffc409ad32ae28fc3c5 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Sun, 3 Feb 2019 17:05:35 +0100 Subject: [PATCH 05/17] Update Carthage dependencies --- Cartfile.private | 6 +++--- Cartfile.resolved | 6 +++--- Carthage/Checkouts/Nimble | 2 +- Carthage/Checkouts/Quick | 2 +- Carthage/Checkouts/ZipArchive | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cartfile.private b/Cartfile.private index 476c2a1f6..0dfa9b497 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,4 +1,4 @@ github "jspahrsummers/xcconfigs" "master" -github "Quick/Quick" ~> 1.2.0 -github "Quick/Nimble" ~> 7.1.0 -github "ZipArchive/ZipArchive" ~> 2.1.2 +github "Quick/Quick" ~> 1.3.4 +github "Quick/Nimble" ~> 7.3.3 +github "ZipArchive/ZipArchive" ~> 2.1.4 diff --git a/Cartfile.resolved b/Cartfile.resolved index ef51bc1cb..36c5288e0 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ -github "Quick/Nimble" "v7.1.0" -github "Quick/Quick" "v1.2.0" -github "ZipArchive/ZipArchive" "v2.1.2" +github "Quick/Nimble" "v7.3.3" +github "Quick/Quick" "v1.3.4" +github "ZipArchive/ZipArchive" "v2.1.4" github "jspahrsummers/xcconfigs" "bb795558a76e5daf3688500055bbcfe243bffa8d" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index 5e11474ae..9a281b1cf 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit 5e11474ae6ea796a07e722fea49269d26710744d +Subproject commit 9a281b1cfa1c53d1e8bd92e1798e4e473af8d263 diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index 0ff81f2c6..f2b5a0644 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit 0ff81f2c665b4381f526bd656f8708dd52a9ea2f +Subproject commit f2b5a06440ea87eba1a167cab37bf6496646c52e diff --git a/Carthage/Checkouts/ZipArchive b/Carthage/Checkouts/ZipArchive index 3ad651c62..e8b08ceb6 160000 --- a/Carthage/Checkouts/ZipArchive +++ b/Carthage/Checkouts/ZipArchive @@ -1 +1 @@ -Subproject commit 3ad651c62c059102acc7384dae6b0d4e0142e990 +Subproject commit e8b08ceb6ab9ff56e0826913b13680a129a92828 From 7ab537e53f81b18d6afc6732405c200842fe8179 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Fri, 8 Feb 2019 23:36:17 +0100 Subject: [PATCH 06/17] Update to libgit2 v0.28.0-rc1 --- External/libgit2 | 2 +- ObjectiveGit/Categories/NSData+Git.m | 2 +- ObjectiveGit/Categories/NSError+Git.m | 4 ++-- ObjectiveGit/GTBlob.m | 2 +- ObjectiveGit/GTCredential.m | 4 ++-- ObjectiveGit/GTDiffPatch.m | 2 +- ObjectiveGit/GTIndexEntry.m | 2 +- ObjectiveGit/GTNote.m | 2 +- ObjectiveGit/GTOID.m | 2 +- ObjectiveGit/GTObject.h | 18 ++++++++---------- ObjectiveGit/GTObject.m | 14 +++++++------- ObjectiveGit/GTObjectDatabase.m | 2 +- ObjectiveGit/GTReference.h | 6 +++--- ObjectiveGit/GTReference.m | 8 ++++---- ObjectiveGit/GTRepository.m | 6 +++--- ObjectiveGit/GTTreeBuilder.m | 2 +- ObjectiveGitTests/GTReferenceSpec.m | 6 +++--- ObjectiveGitTests/GTRepositorySpec.m | 6 +++--- 18 files changed, 44 insertions(+), 46 deletions(-) diff --git a/External/libgit2 b/External/libgit2 index f23dc5b29..1a107fac0 160000 --- a/External/libgit2 +++ b/External/libgit2 @@ -1 +1 @@ -Subproject commit f23dc5b29f1394928a940d7ec447f4bfd53dad1f +Subproject commit 1a107fac0fc88a4d74b64ffc9ae2fd178ba631c0 diff --git a/ObjectiveGit/Categories/NSData+Git.m b/ObjectiveGit/Categories/NSData+Git.m index 2f06dd9fc..6498dfbe0 100644 --- a/ObjectiveGit/Categories/NSData+Git.m +++ b/ObjectiveGit/Categories/NSData+Git.m @@ -17,7 +17,7 @@ - (BOOL)git_getOid:(git_oid *)oid error:(NSError **)error { if ([self length] != sizeof(git_oid)) { if (error != NULL) { *error = [NSError errorWithDomain:GTGitErrorDomain - code:GITERR_INVALID + code:GIT_ERROR_INVALID userInfo: [NSDictionary dictionaryWithObject:@"can't extract oid from data of incorrect length" forKey:NSLocalizedDescriptionKey]]; diff --git a/ObjectiveGit/Categories/NSError+Git.m b/ObjectiveGit/Categories/NSError+Git.m index e66d2fcb3..422b32d1f 100644 --- a/ObjectiveGit/Categories/NSError+Git.m +++ b/ObjectiveGit/Categories/NSError+Git.m @@ -98,10 +98,10 @@ + (NSError *)git_errorFor:(int)code { } + (NSString *)git_descriptionForErrorCode:(int)code { - const git_error *gitLastError = giterr_last(); + const git_error *gitLastError = git_error_last(); if (gitLastError != NULL) { return @(gitLastError->message); - } else if (code == GITERR_OS) { + } else if (code == GIT_ERROR_OS) { return @(strerror(errno)); } else { return nil; diff --git a/ObjectiveGit/GTBlob.m b/ObjectiveGit/GTBlob.m index 1f1e5213c..a1634dcf5 100644 --- a/ObjectiveGit/GTBlob.m +++ b/ObjectiveGit/GTBlob.m @@ -63,7 +63,7 @@ - (instancetype)initWithOid:(const git_oid *)oid inRepository:(GTRepository *)re NSParameterAssert(repository != nil); git_object *obj; - int gitError = git_object_lookup(&obj, repository.git_repository, oid, (git_otype) GTObjectTypeBlob); + int gitError = git_object_lookup(&obj, repository.git_repository, oid, (git_object_t) GTObjectTypeBlob); if (gitError < GIT_OK) { if (error != NULL) { *error = [NSError git_errorFor:gitError description:@"Failed to lookup blob"]; diff --git a/ObjectiveGit/GTCredential.m b/ObjectiveGit/GTCredential.m index 0ee809b0e..1d3894b44 100644 --- a/ObjectiveGit/GTCredential.m +++ b/ObjectiveGit/GTCredential.m @@ -105,7 +105,7 @@ int GTCredentialAcquireCallback(git_cred **git_cred, const char *url, const char GTCredentialProvider *provider = info->credProvider; if (provider == nil) { - giterr_set_str(GIT_EUSER, "No GTCredentialProvider set, but authentication was requested."); + git_error_set_str(GIT_EUSER, "No GTCredentialProvider set, but authentication was requested."); return GIT_ERROR; } @@ -114,7 +114,7 @@ int GTCredentialAcquireCallback(git_cred **git_cred, const char *url, const char GTCredential *cred = [provider credentialForType:(GTCredentialType)allowed_types URL:URL userName:userName]; if (cred == nil) { - giterr_set_str(GIT_EUSER, "GTCredentialProvider failed to provide credentials."); + git_error_set_str(GIT_EUSER, "GTCredentialProvider failed to provide credentials."); return GIT_ERROR; } diff --git a/ObjectiveGit/GTDiffPatch.m b/ObjectiveGit/GTDiffPatch.m index fe28d662a..715db5a13 100644 --- a/ObjectiveGit/GTDiffPatch.m +++ b/ObjectiveGit/GTDiffPatch.m @@ -69,7 +69,7 @@ - (NSData *)patchData { git_patch_to_buf(&buf, self.git_patch); NSData *buffer = [[NSData alloc] initWithBytes:buf.ptr length:buf.size]; - git_buf_free(&buf); + git_buf_dispose(&buf); return buffer; } diff --git a/ObjectiveGit/GTIndexEntry.m b/ObjectiveGit/GTIndexEntry.m index 855393c3d..c687d0060 100644 --- a/ObjectiveGit/GTIndexEntry.m +++ b/ObjectiveGit/GTIndexEntry.m @@ -127,7 +127,7 @@ + (instancetype)objectWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError * - (instancetype)initWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError **)error { git_object *obj; - int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_otype)GTObjectTypeAny); + int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_object_t)GTObjectTypeAny); if (gitError < GIT_OK) { if (error != NULL) { diff --git a/ObjectiveGit/GTNote.m b/ObjectiveGit/GTNote.m index 4562b0845..b87039de1 100644 --- a/ObjectiveGit/GTNote.m +++ b/ObjectiveGit/GTNote.m @@ -98,7 +98,7 @@ + (NSString *)defaultReferenceNameForRepository:(GTRepository *)repository error if (error != NULL) *error = [NSError git_errorFor:GIT_ERROR description:@"Unable to get default git notes reference name"]; } - git_buf_free(&default_ref_name); + git_buf_dispose(&default_ref_name); return noteRef; } diff --git a/ObjectiveGit/GTOID.m b/ObjectiveGit/GTOID.m index c97da8735..8010c2885 100644 --- a/ObjectiveGit/GTOID.m +++ b/ObjectiveGit/GTOID.m @@ -133,7 +133,7 @@ + (instancetype)OIDByHashingData:(NSData *)data type:(GTObjectType)type error:(N NSParameterAssert(data != nil); git_oid oid; - int gitError = git_odb_hash(&oid, data.bytes, data.length, (git_otype)type); + int gitError = git_odb_hash(&oid, data.bytes, data.length, (git_object_t)type); if (gitError != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to hash"]; return nil; diff --git a/ObjectiveGit/GTObject.h b/ObjectiveGit/GTObject.h index 66ef8b89c..a74ed418c 100644 --- a/ObjectiveGit/GTObject.h +++ b/ObjectiveGit/GTObject.h @@ -31,16 +31,14 @@ #import "git2/types.h" typedef NS_ENUM(int, GTObjectType) { - GTObjectTypeAny = GIT_OBJ_ANY, /**< Object can be any of the following */ - GTObjectTypeBad = GIT_OBJ_BAD, /**< Object is invalid. */ - GTObjectTypeExt1 = GIT_OBJ__EXT1, /**< Reserved for future use. */ - GTObjectTypeCommit = GIT_OBJ_COMMIT, /**< A commit object. */ - GTObjectTypeTree = GIT_OBJ_TREE, /**< A tree (directory listing) object. */ - GTObjectTypeBlob = GIT_OBJ_BLOB, /**< A file revision object. */ - GTObjectTypeTag = GIT_OBJ_TAG, /**< An annotated tag object. */ - GTObjectTypeExt2 = GIT_OBJ__EXT2, /**< Reserved for future use. */ - GTObjectTypeOffsetDelta = GIT_OBJ_OFS_DELTA,/**< A delta, base is given by an offset. */ - GTObjectTypeRefDelta = GIT_OBJ_REF_DELTA, /**< A delta, base is given by object id. */ + GTObjectTypeAny = GIT_OBJECT_ANY, /**< Object can be any of the following */ + GTObjectTypeBad = GIT_OBJECT_INVALID, /**< Object is invalid. */ + GTObjectTypeCommit = GIT_OBJECT_COMMIT, /**< A commit object. */ + GTObjectTypeTree = GIT_OBJECT_TREE, /**< A tree (directory listing) object. */ + GTObjectTypeBlob = GIT_OBJECT_BLOB, /**< A file revision object. */ + GTObjectTypeTag = GIT_OBJECT_TAG, /**< An annotated tag object. */ + GTObjectTypeOffsetDelta = GIT_OBJECT_OFS_DELTA,/**< A delta, base is given by an offset. */ + GTObjectTypeRefDelta = GIT_OBJECT_REF_DELTA, /**< A delta, base is given by object id. */ }; @class GTRepository; diff --git a/ObjectiveGit/GTObject.m b/ObjectiveGit/GTObject.m index 46ae4ae0e..503585092 100644 --- a/ObjectiveGit/GTObject.m +++ b/ObjectiveGit/GTObject.m @@ -82,18 +82,18 @@ - (id)initWithObj:(git_object *)object inRepository:(GTRepository *)repo { NSAssert(object_repo == repo.git_repository, @"object %p doesn't belong to repo %@", object, repo); Class objectClass = nil; - git_otype t = git_object_type(object); + git_object_t t = git_object_type(object); switch (t) { - case GIT_OBJ_COMMIT: + case GIT_OBJECT_COMMIT: objectClass = [GTCommit class]; break; - case GIT_OBJ_TREE: + case GIT_OBJECT_TREE: objectClass = [GTTree class]; break; - case GIT_OBJ_BLOB: + case GIT_OBJECT_BLOB: objectClass = [GTBlob class]; break; - case GIT_OBJ_TAG: + case GIT_OBJECT_TAG: objectClass = [GTTag class]; break; default: @@ -101,7 +101,7 @@ - (id)initWithObj:(git_object *)object inRepository:(GTRepository *)repo { } if (!objectClass) { - NSLog(@"Unknown git_otype %s (%d)", git_object_type2string(t), (int)t); + NSLog(@"Unknown git_object_t %s (%d)", git_object_type2string(t), (int)t); return nil; } @@ -149,7 +149,7 @@ - (GTOdbObject *)odbObjectWithError:(NSError **)error { - (id)objectByPeelingToType:(GTObjectType)type error:(NSError **)error { git_object *peeled = NULL; - int gitError = git_object_peel(&peeled, self.git_object, (git_otype)type); + int gitError = git_object_peel(&peeled, self.git_object, (git_object_t)type); if (gitError != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Cannot peel object"]; return nil; diff --git a/ObjectiveGit/GTObjectDatabase.m b/ObjectiveGit/GTObjectDatabase.m index 534df08da..99c431a48 100644 --- a/ObjectiveGit/GTObjectDatabase.m +++ b/ObjectiveGit/GTObjectDatabase.m @@ -102,7 +102,7 @@ - (GTOID *)writeData:(NSData *)data type:(GTObjectType)type error:(NSError **)er NSParameterAssert(data != nil); git_odb_stream *stream; - int gitError = git_odb_open_wstream(&stream, self.git_odb, data.length, (git_otype)type); + int gitError = git_odb_open_wstream(&stream, self.git_odb, data.length, (git_object_t)type); @onExit { if (stream != NULL) git_odb_stream_free(stream); }; diff --git a/ObjectiveGit/GTReference.h b/ObjectiveGit/GTReference.h index 786739fac..c24a9fc7b 100644 --- a/ObjectiveGit/GTReference.h +++ b/ObjectiveGit/GTReference.h @@ -34,9 +34,9 @@ typedef NS_ENUM(NSInteger, GTReferenceErrorCode) { }; typedef NS_OPTIONS(NSInteger, GTReferenceType) { - GTReferenceTypeInvalid = GIT_REF_INVALID, /** Invalid reference */ - GTReferenceTypeOid = GIT_REF_OID, /** A reference which points at an object id */ - GTReferenceTypeSymbolic = GIT_REF_SYMBOLIC, /** A reference which points at another reference */ + GTReferenceTypeInvalid = GIT_REFERENCE_INVALID, /** Invalid reference */ + GTReferenceTypeDirect = GIT_REFERENCE_DIRECT, /** A reference which points at an object id */ + GTReferenceTypeSymbolic = GIT_REFERENCE_SYMBOLIC, /** A reference which points at another reference */ }; NS_ASSUME_NONNULL_BEGIN diff --git a/ObjectiveGit/GTReference.m b/ObjectiveGit/GTReference.m index 2baacdacb..080375dd2 100644 --- a/ObjectiveGit/GTReference.m +++ b/ObjectiveGit/GTReference.m @@ -45,7 +45,7 @@ @interface GTReference () case GTReferenceTypeInvalid: return @"invalid"; - case GTReferenceTypeOid: + case GTReferenceTypeDirect: return @"direct"; case GTReferenceTypeSymbolic: @@ -144,7 +144,7 @@ - (GTReferenceType)referenceType { } - (id)unresolvedTarget { - if (self.referenceType == GTReferenceTypeOid) { + if (self.referenceType == GTReferenceTypeDirect) { const git_oid *oid = git_reference_target(self.git_reference); if (oid == NULL) return nil; @@ -160,7 +160,7 @@ - (id)unresolvedTarget { - (id)resolvedTarget { git_object *obj; - if (git_reference_peel(&obj, self.git_reference, GIT_OBJ_ANY) != GIT_OK) { + if (git_reference_peel(&obj, self.git_reference, GIT_OBJECT_ANY) != GIT_OK) { return nil; } @@ -181,7 +181,7 @@ - (GTReference *)referenceByUpdatingTarget:(NSString *)newTarget message:(NSStri int gitError; git_reference *newRef = NULL; - if (git_reference_type(self.git_reference) == GIT_REF_OID) { + if (git_reference_type(self.git_reference) == GIT_REFERENCE_DIRECT) { GTOID *oid = [[GTOID alloc] initWithSHA:newTarget error:error]; if (oid == nil) return nil; diff --git a/ObjectiveGit/GTRepository.m b/ObjectiveGit/GTRepository.m index 851d81c28..133216cd4 100644 --- a/ObjectiveGit/GTRepository.m +++ b/ObjectiveGit/GTRepository.m @@ -317,7 +317,7 @@ + (instancetype _Nullable)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NS - (id)lookUpObjectByGitOid:(const git_oid *)oid objectType:(GTObjectType)type error:(NSError **)error { git_object *obj; - int gitError = git_object_lookup(&obj, self.git_repository, oid, (git_otype)type); + int gitError = git_object_lookup(&obj, self.git_repository, oid, (git_object_t)type); if (gitError < GIT_OK) { if (error != NULL) { char oid_str[GIT_OID_HEXSZ+1]; @@ -683,13 +683,13 @@ - (NSString *)preparedMessageWithError:(NSError * __autoreleasing *)error { int errorCode = git_repository_message(&msg, self.git_repository); if (errorCode != GIT_OK) { setErrorFromCode(errorCode); - git_buf_free(&msg); + git_buf_dispose(&msg); return nil; } NSString *message = [[NSString alloc] initWithBytes:msg.ptr length:msg.size encoding:NSUTF8StringEncoding]; - git_buf_free(&msg); + git_buf_dispose(&msg); return message; } diff --git a/ObjectiveGit/GTTreeBuilder.m b/ObjectiveGit/GTTreeBuilder.m index 5ae85646a..d53118e9d 100644 --- a/ObjectiveGit/GTTreeBuilder.m +++ b/ObjectiveGit/GTTreeBuilder.m @@ -155,7 +155,7 @@ - (GTTree *)writeTree:(NSError **)error { } git_object *object = NULL; - status = git_object_lookup(&object, self.repository.git_repository, &treeOid, GIT_OBJ_TREE); + status = git_object_lookup(&object, self.repository.git_repository, &treeOid, GIT_OBJECT_TREE); if (status != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:status description:@"Failed to lookup tree in repository."]; return nil; diff --git a/ObjectiveGitTests/GTReferenceSpec.m b/ObjectiveGitTests/GTReferenceSpec.m index 811a7e952..a3b9b4022 100644 --- a/ObjectiveGitTests/GTReferenceSpec.m +++ b/ObjectiveGitTests/GTReferenceSpec.m @@ -135,7 +135,7 @@ expect(ref).notTo(beNil()); expect(error).to(beNil()); - expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeOid, @"refs/heads/master"); + expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeDirect, @"refs/heads/master"); }); it(@"should return a valid reference to a tag", ^{ @@ -144,7 +144,7 @@ expect(ref).notTo(beNil()); expect(error).to(beNil()); - expectValidReference(ref, @"5b5b025afb0b4c913b4c338a42934a3863bf3644", GTReferenceTypeOid, @"refs/tags/v0.9"); + expectValidReference(ref, @"5b5b025afb0b4c913b4c338a42934a3863bf3644", GTReferenceTypeDirect, @"refs/tags/v0.9"); }); }); @@ -170,7 +170,7 @@ expect(error).to(beNil()); expect(ref).notTo(beNil()); - expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeOid, @"refs/heads/unit_test"); + expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeDirect, @"refs/heads/unit_test"); }); }); diff --git a/ObjectiveGitTests/GTRepositorySpec.m b/ObjectiveGitTests/GTRepositorySpec.m index 8da554cc8..2ff1aaf88 100644 --- a/ObjectiveGitTests/GTRepositorySpec.m +++ b/ObjectiveGitTests/GTRepositorySpec.m @@ -114,7 +114,7 @@ expect(head).notTo(beNil()); expect(error).to(beNil()); expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a")); - expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid))); + expect(@(head.referenceType)).to(equal(@(GTReferenceTypeDirect))); }); it(@"should handle bare clones", ^{ @@ -139,7 +139,7 @@ expect(head).notTo(beNil()); expect(error).to(beNil()); expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a")); - expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid))); + expect(@(head.referenceType)).to(equal(@(GTReferenceTypeDirect))); }); it(@"should have set a valid remote URL", ^{ @@ -212,7 +212,7 @@ expect(head).notTo(beNil()); expect(error).to(beNil()); expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a")); - expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid))); + expect(@(head.referenceType)).to(equal(@(GTReferenceTypeDirect))); }); it(@"should fail to return HEAD for an unborn repo", ^{ From 22fd20baab7b9ea3e64801a76058e2d0f1fb8d21 Mon Sep 17 00:00:00 2001 From: Mingshen Sun Date: Fri, 22 Mar 2019 23:44:49 -0700 Subject: [PATCH 07/17] Update libssh2 to 1.8.1 --- External/libssh2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/External/libssh2 b/External/libssh2 index 30e9c1347..f15b1e297 160000 --- a/External/libssh2 +++ b/External/libssh2 @@ -1 +1 @@ -Subproject commit 30e9c1347e3b8baa2951db612f05e6d87fc8e2f2 +Subproject commit f15b1e297f72882214988101ccdc5e6ad30d7e6e From d14f598582d6340de59ae6cfd95c73167c9d8062 Mon Sep 17 00:00:00 2001 From: David Catmull Date: Tue, 18 Jun 2019 15:30:38 -0600 Subject: [PATCH 08/17] Do Xcode's recommended localization naming updates --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 14 +++++++------- {English.lproj => en.lproj}/InfoPlist.strings | 0 2 files changed, 7 insertions(+), 7 deletions(-) rename {English.lproj => en.lproj}/InfoPlist.strings (100%) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 5043f44c4..3edf16bdf 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -452,7 +452,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 200578C418932A82001C06C3 /* GTBlameSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlameSpec.m; sourceTree = ""; }; 2089E43B17D9A58000F451DA /* GTTagSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTTagSpec.m; sourceTree = ""; }; @@ -592,6 +591,7 @@ BDFAF9C2131C1845000508BC /* GTIndex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTIndex.m; sourceTree = ""; }; BDFAF9C7131C1868000508BC /* GTIndexEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTIndexEntry.h; sourceTree = ""; }; BDFAF9C8131C1868000508BC /* GTIndexEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = GTIndexEntry.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + C9088CC322B98E8300DB4A02 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; D00F6815175D373C004DB9D6 /* GTReferenceSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTReferenceSpec.m; sourceTree = ""; }; D015F7C817F695E800AD5E1F /* GTRepository+Stashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Stashing.h"; sourceTree = ""; }; D015F7C917F695E800AD5E1F /* GTRepository+Stashing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTRepository+Stashing.m"; sourceTree = ""; }; @@ -1303,14 +1303,14 @@ }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ObjectiveGitFramework" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, en, + ja, + fr, + de, + Base, ); mainGroup = 0867D691FE84028FC02AAC07 /* ObjectiveGitFramework */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -1684,7 +1684,7 @@ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 089C1667FE841158C02AAC07 /* English */, + C9088CC322B98E8300DB4A02 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/English.lproj/InfoPlist.strings b/en.lproj/InfoPlist.strings similarity index 100% rename from English.lproj/InfoPlist.strings rename to en.lproj/InfoPlist.strings From eb6b981ffce8fc30c5a221a8478345e13d5c036f Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Thu, 28 Jan 2021 12:45:33 +0100 Subject: [PATCH 09/17] Deployment target 10.9 --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 3edf16bdf..004bc0e11 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -1775,7 +1775,7 @@ ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "$(inherited)", @@ -1814,7 +1814,7 @@ ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", @@ -1947,7 +1947,7 @@ ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", @@ -2167,7 +2167,7 @@ ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", From b8c60016353c902e25a494f9b3befa6b25c4dcd1 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Thu, 28 Jan 2021 13:12:49 +0100 Subject: [PATCH 10/17] Recent brew list sysntax *** Updating submodules... *** Checking dependencies... Error: Calling `brew list` to only list formulae is disabled! Use `brew list --formula` instead. --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 18f76616a..aca53e814 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -62,7 +62,7 @@ check_deps () fi # Ensure that we have libgit2's dependencies installed. - installed=`brew list` + installed=`brew list --formula` for tool in $REQUIRED_TOOLS do From dd7040fd170af509a2c83b2c1195a8a043b5b828 Mon Sep 17 00:00:00 2001 From: Leif Bredgaard Honore Date: Tue, 3 Dec 2019 09:19:40 +0100 Subject: [PATCH 11/17] Paths in modulemap updated --- ObjectiveGit.modulemap | 138 +++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/ObjectiveGit.modulemap b/ObjectiveGit.modulemap index 3ef32bc58..9e7980ed3 100644 --- a/ObjectiveGit.modulemap +++ b/ObjectiveGit.modulemap @@ -50,6 +50,7 @@ framework module ObjectiveGit { header "git2/tree.h" header "git2/types.h" header "git2/version.h" + header "git2/sys/alloc.h" header "git2/sys/commit.h" header "git2/sys/config.h" header "git2/sys/diff.h" @@ -59,6 +60,7 @@ framework module ObjectiveGit { header "git2/sys/mempack.h" header "git2/sys/merge.h" header "git2/sys/odb_backend.h" + header "git2/sys/path.h" header "git2/sys/refdb_backend.h" header "git2/sys/reflog.h" header "git2/sys/refs.h" @@ -72,74 +74,74 @@ framework module ObjectiveGit { exclude header "git2/inttypes.h" exclude header "git2/stdint.h" - exclude header "git2/sys/git2/annotated_commit.h" - exclude header "git2/sys/git2/attr.h" - exclude header "git2/sys/git2/blame.h" - exclude header "git2/sys/git2/blob.h" - exclude header "git2/sys/git2/branch.h" - exclude header "git2/sys/git2/buffer.h" - exclude header "git2/sys/git2/checkout.h" - exclude header "git2/sys/git2/cherrypick.h" - exclude header "git2/sys/git2/clone.h" - exclude header "git2/sys/git2/commit.h" - exclude header "git2/sys/git2/cred_helpers.h" - exclude header "git2/sys/git2/describe.h" - exclude header "git2/sys/git2/errors.h" - exclude header "git2/sys/git2/global.h" - exclude header "git2/sys/git2/graph.h" - exclude header "git2/sys/git2/ignore.h" - exclude header "git2/sys/git2/index.h" - exclude header "git2/sys/git2/indexer.h" - exclude header "git2/sys/git2/inttypes.h" - exclude header "git2/sys/git2/merge.h" - exclude header "git2/sys/git2/message.h" - exclude header "git2/sys/git2/notes.h" - exclude header "git2/sys/git2/object.h" - exclude header "git2/sys/git2/odb_backend.h" - exclude header "git2/sys/git2/oidarray.h" - exclude header "git2/sys/git2/pack.h" - exclude header "git2/sys/git2/patch.h" - exclude header "git2/sys/git2/pathspec.h" - exclude header "git2/sys/git2/rebase.h" - exclude header "git2/sys/git2/refdb.h" - exclude header "git2/sys/git2/reflog.h" - exclude header "git2/sys/git2/refs.h" - exclude header "git2/sys/git2/refspec.h" - exclude header "git2/sys/git2/remote.h" - exclude header "git2/sys/git2/repository.h" - exclude header "git2/sys/git2/reset.h" - exclude header "git2/sys/git2/revert.h" - exclude header "git2/sys/git2/revparse.h" - exclude header "git2/sys/git2/revwalk.h" - exclude header "git2/sys/git2/signature.h" - exclude header "git2/sys/git2/stash.h" - exclude header "git2/sys/git2/stdint.h" - exclude header "git2/sys/git2/strarray.h" - exclude header "git2/sys/git2/submodule.h" - exclude header "git2/sys/git2/tag.h" - exclude header "git2/sys/git2/trace.h" - exclude header "git2/sys/git2/transaction.h" - exclude header "git2/sys/git2/transport.h" - exclude header "git2/sys/git2/tree.h" - exclude header "git2/sys/git2/version.h" - exclude header "git2/sys/git2/sys/commit.h" - exclude header "git2/sys/git2/sys/config.h" - exclude header "git2/sys/git2/sys/diff.h" - exclude header "git2/sys/git2/sys/filter.h" - exclude header "git2/sys/git2/sys/hashsig.h" - exclude header "git2/sys/git2/sys/index.h" - exclude header "git2/sys/git2/sys/mempack.h" - exclude header "git2/sys/git2/sys/merge.h" - exclude header "git2/sys/git2/sys/odb_backend.h" - exclude header "git2/sys/git2/sys/openssl.h" - exclude header "git2/sys/git2/sys/refdb_backend.h" - exclude header "git2/sys/git2/sys/reflog.h" - exclude header "git2/sys/git2/sys/refs.h" - exclude header "git2/sys/git2/sys/repository.h" - exclude header "git2/sys/git2/sys/stream.h" - exclude header "git2/sys/git2/sys/time.h" - exclude header "git2/sys/git2/sys/transport.h" - exclude header "git2/sys/git2/sys/worktree.h" + exclude header "git2/sys/annotated_commit.h" + exclude header "git2/sys/attr.h" + exclude header "git2/sys/blame.h" + exclude header "git2/sys/blob.h" + exclude header "git2/sys/branch.h" + exclude header "git2/sys/buffer.h" + exclude header "git2/sys/checkout.h" + exclude header "git2/sys/cherrypick.h" + exclude header "git2/sys/clone.h" + exclude header "git2/sys/commit.h" + exclude header "git2/sys/cred_helpers.h" + exclude header "git2/sys/describe.h" + exclude header "git2/sys/errors.h" + exclude header "git2/sys/global.h" + exclude header "git2/sys/graph.h" + exclude header "git2/sys/ignore.h" + exclude header "git2/sys/index.h" + exclude header "git2/sys/indexer.h" + exclude header "git2/sys/inttypes.h" + exclude header "git2/sys/merge.h" + exclude header "git2/sys/message.h" + exclude header "git2/sys/notes.h" + exclude header "git2/sys/object.h" + exclude header "git2/sys/odb_backend.h" + exclude header "git2/sys/oidarray.h" + exclude header "git2/sys/pack.h" + exclude header "git2/sys/patch.h" + exclude header "git2/sys/pathspec.h" + exclude header "git2/sys/rebase.h" + exclude header "git2/sys/refdb.h" + exclude header "git2/sys/reflog.h" + exclude header "git2/sys/refs.h" + exclude header "git2/sys/refspec.h" + exclude header "git2/sys/remote.h" + exclude header "git2/sys/repository.h" + exclude header "git2/sys/reset.h" + exclude header "git2/sys/revert.h" + exclude header "git2/sys/revparse.h" + exclude header "git2/sys/revwalk.h" + exclude header "git2/sys/signature.h" + exclude header "git2/sys/stash.h" + exclude header "git2/sys/stdint.h" + exclude header "git2/sys/strarray.h" + exclude header "git2/sys/submodule.h" + exclude header "git2/sys/tag.h" + exclude header "git2/sys/trace.h" + exclude header "git2/sys/transaction.h" + exclude header "git2/sys/transport.h" + exclude header "git2/sys/tree.h" + exclude header "git2/sys/version.h" + exclude header "git2/sys/commit.h" + exclude header "git2/sys/config.h" + exclude header "git2/sys/diff.h" + exclude header "git2/sys/filter.h" + exclude header "git2/sys/hashsig.h" + exclude header "git2/sys/index.h" + exclude header "git2/sys/mempack.h" + exclude header "git2/sys/merge.h" + exclude header "git2/sys/odb_backend.h" + exclude header "git2/sys/openssl.h" + exclude header "git2/sys/refdb_backend.h" + exclude header "git2/sys/reflog.h" + exclude header "git2/sys/refs.h" + exclude header "git2/sys/repository.h" + exclude header "git2/sys/stream.h" + exclude header "git2/sys/time.h" + exclude header "git2/sys/transport.h" + exclude header "git2/sys/worktree.h" export * module * { export * } From d190953dd9f71a9b4470f51b28a62b4dd74eab99 Mon Sep 17 00:00:00 2001 From: Leif Bredgaard Honore Date: Tue, 3 Dec 2019 09:20:44 +0100 Subject: [PATCH 12/17] Swift version updates for Swift 5 and XCode 11.2 --- .../project.pbxproj | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 004bc0e11..da937cf9a 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -66,6 +66,7 @@ 23F39FAE1C86DB1C00849F3C /* GTRepository+Merging.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F39FAC1C86DB1C00849F3C /* GTRepository+Merging.m */; }; 23F39FAF1C86DD0A00849F3C /* GTRepository+Merging.h in Headers */ = {isa = PBXBuildFile; fileRef = 23F39FAB1C86DB1C00849F3C /* GTRepository+Merging.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23F39FB01C86E01800849F3C /* GTRepository+Merging.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F39FAC1C86DB1C00849F3C /* GTRepository+Merging.m */; }; + 2970FCDB2395526E0042C0DC /* git2 in Headers */ = {isa = PBXBuildFile; fileRef = 889923F919FF5DD40092A9A6 /* git2 */; settings = {ATTRIBUTES = (Public, ); }; }; 3011D86B1668E48500CE3409 /* GTDiffFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8691668E48500CE3409 /* GTDiffFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3011D86D1668E48500CE3409 /* GTDiffFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D86A1668E48500CE3409 /* GTDiffFile.m */; }; 3011D8711668E78500CE3409 /* GTDiffHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D86F1668E78500CE3409 /* GTDiffHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -134,7 +135,6 @@ 88746CC417FA1C950005888A /* GTRepository+Committing.h in Headers */ = {isa = PBXBuildFile; fileRef = 88746CC217FA1C950005888A /* GTRepository+Committing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88746CC617FA1C950005888A /* GTRepository+Committing.m in Sources */ = {isa = PBXBuildFile; fileRef = 88746CC317FA1C950005888A /* GTRepository+Committing.m */; }; 88948AC91779243600809CDA /* GTObjectDatabaseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88948AC81779243600809CDA /* GTObjectDatabaseSpec.m */; }; - 889923FB19FF5DD40092A9A6 /* git2 in Headers */ = {isa = PBXBuildFile; fileRef = 889923F919FF5DD40092A9A6 /* git2 */; settings = {ATTRIBUTES = (Public, ); }; }; 88A994BA16FCE7D400402C7B /* GTBranchSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994B916FCE7D400402C7B /* GTBranchSpec.m */; }; 88A994CB16FCED1D00402C7B /* QuickSpec+GTFixtures.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */; }; 88B2131C1B20E785005CF2C5 /* GTRepository+References.h in Headers */ = {isa = PBXBuildFile; fileRef = 88B2131A1B20E785005CF2C5 /* GTRepository+References.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1135,6 +1135,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 2970FCDB2395526E0042C0DC /* git2 in Headers */, + D01B6F1419F82F6000D411BC /* git2.h in Headers */, D01B6F3D19F82F8700D411BC /* GTTag.h in Headers */, D01B6F4119F82F8700D411BC /* GTIndexEntry.h in Headers */, D01B6F2319F82F8700D411BC /* GTRepository+Reset.h in Headers */, @@ -1188,9 +1190,7 @@ D01B6F1B19F82F7B00D411BC /* NSDate+GTTimeAdditions.h in Headers */, F964D5F21CE9D9B200F1D8DD /* GTNote.h in Headers */, D01B6F6319F82FA600D411BC /* GTFilterList.h in Headers */, - 889923FB19FF5DD40092A9A6 /* git2 in Headers */, F8D1BDEF1B31FE7C00CDEC90 /* GTRepository+Pull.h in Headers */, - D01B6F1419F82F6000D411BC /* git2.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1282,7 +1282,7 @@ attributes = { LastSwiftUpdateCheck = 0700; LastTestingUpgradeCheck = 0510; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1120; ORGANIZATIONNAME = "GitHub, Inc"; TargetAttributes = { 88F05A6A16011E5400B7AD1D = { @@ -1781,7 +1781,7 @@ "$(inherited)", "-DGIT_SSH", ); - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; WARNING_CFLAGS = ( "$(inherited)", @@ -1819,7 +1819,7 @@ "$(inherited)", "-DGIT_SSH", ); - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; WARNING_CFLAGS = ( "$(inherited)", @@ -1898,7 +1898,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1919,7 +1919,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1952,7 +1952,7 @@ "$(inherited)", "-DGIT_SSH", ); - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; WARNING_CFLAGS = ( "$(inherited)", @@ -2007,7 +2007,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Test; }; @@ -2015,7 +2015,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1; @@ -2072,7 +2072,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1; @@ -2097,7 +2097,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1; @@ -2122,7 +2122,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1; @@ -2172,7 +2172,7 @@ "$(inherited)", "-DGIT_SSH", ); - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; WARNING_CFLAGS = ( "$(inherited)", @@ -2227,7 +2227,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Profile; }; From 2112a6d8ebe438ba921272e3361ba3dc440493c5 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sun, 22 Nov 2020 09:53:28 +0100 Subject: [PATCH 13/17] Github CI Update CI names Change CI build target --- .github/workflows/BuildPR.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/BuildPR.yml diff --git a/.github/workflows/BuildPR.yml b/.github/workflows/BuildPR.yml new file mode 100644 index 000000000..46d8444eb --- /dev/null +++ b/.github/workflows/BuildPR.yml @@ -0,0 +1,19 @@ +name: PullRequest + +on: [pull_request] + +jobs: + build-objective-git: + name: Build objective-git + runs-on: macOS-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.3 + with: + fetch-depth: 0 + submodules: true + - name: Set XCode Version + run: sudo xcode-select -s /Applications/Xcode_12.2.app + - name: Build project + run: set -o pipefail && xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" build | xcpretty + From 7054feb7cec7cbf5eaf84495b02228f7d669b251 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Fri, 5 Feb 2021 08:18:45 +0100 Subject: [PATCH 14/17] Build multiple Xcode versions during pull request --- .github/workflows/BuildPR.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BuildPR.yml b/.github/workflows/BuildPR.yml index 46d8444eb..0a1a7d32f 100644 --- a/.github/workflows/BuildPR.yml +++ b/.github/workflows/BuildPR.yml @@ -6,6 +6,10 @@ jobs: build-objective-git: name: Build objective-git runs-on: macOS-latest + strategy: + fail-fast: false + matrix: + xcode: [Xcode_11.7, Xcode_12.2, Xcode_12.4] steps: - name: Checkout uses: actions/checkout@v2.3.3 @@ -13,7 +17,7 @@ jobs: fetch-depth: 0 submodules: true - name: Set XCode Version - run: sudo xcode-select -s /Applications/Xcode_12.2.app + run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app - name: Build project - run: set -o pipefail && xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" build | xcpretty + run: xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" archive | xcpretty From 44dceb5790a721f9068ac8fde5b42ed0a304b703 Mon Sep 17 00:00:00 2001 From: vvveiii Date: Sat, 21 Mar 2020 22:16:00 +0800 Subject: [PATCH 15/17] Update Carthage dependencies --- Cartfile.resolved | 6 +-- Carthage/Checkouts/Nimble | 2 +- Carthage/Checkouts/ZipArchive | 2 +- Carthage/Checkouts/xcconfigs | 2 +- .../project.pbxproj | 44 ++++++++++++++----- 5 files changed, 38 insertions(+), 18 deletions(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index 36c5288e0..5fe843334 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ -github "Quick/Nimble" "v7.3.3" +github "Quick/Nimble" "v7.3.4" github "Quick/Quick" "v1.3.4" -github "ZipArchive/ZipArchive" "v2.1.4" -github "jspahrsummers/xcconfigs" "bb795558a76e5daf3688500055bbcfe243bffa8d" +github "ZipArchive/ZipArchive" "v2.2.2" +github "jspahrsummers/xcconfigs" "81e1c552847883c15d5cbfda2adca6ec78044ead" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index 9a281b1cf..e9d769113 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit 9a281b1cfa1c53d1e8bd92e1798e4e473af8d263 +Subproject commit e9d769113660769a4d9dd3afb855562c0b7ae7b0 diff --git a/Carthage/Checkouts/ZipArchive b/Carthage/Checkouts/ZipArchive index e8b08ceb6..582949eaf 160000 --- a/Carthage/Checkouts/ZipArchive +++ b/Carthage/Checkouts/ZipArchive @@ -1 +1 @@ -Subproject commit e8b08ceb6ab9ff56e0826913b13680a129a92828 +Subproject commit 582949eaf50e988305bc9e76302ab020ca3d900b diff --git a/Carthage/Checkouts/xcconfigs b/Carthage/Checkouts/xcconfigs index bb795558a..81e1c5528 160000 --- a/Carthage/Checkouts/xcconfigs +++ b/Carthage/Checkouts/xcconfigs @@ -1 +1 @@ -Subproject commit bb795558a76e5daf3688500055bbcfe243bffa8d +Subproject commit 81e1c552847883c15d5cbfda2adca6ec78044ead diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index da937cf9a..2ce1e9527 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -453,6 +453,12 @@ /* Begin PBXFileReference section */ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 15CDDA5E2426568C00FC081A /* macOS-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "macOS-Application.xcconfig"; sourceTree = ""; }; + 15CDDA5F2426568C00FC081A /* macOS-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "macOS-Framework.xcconfig"; sourceTree = ""; }; + 15CDDA602426568C00FC081A /* macOS-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "macOS-StaticLibrary.xcconfig"; sourceTree = ""; }; + 15CDDA612426568C00FC081A /* macOS-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "macOS-Base.xcconfig"; sourceTree = ""; }; + 15CDDA622426568C00FC081A /* macOS-XCTest.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "macOS-XCTest.xcconfig"; sourceTree = ""; }; + 15CDDA632426568C00FC081A /* macOS-DynamicLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "macOS-DynamicLibrary.xcconfig"; sourceTree = ""; }; 200578C418932A82001C06C3 /* GTBlameSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlameSpec.m; sourceTree = ""; }; 2089E43B17D9A58000F451DA /* GTTagSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTTagSpec.m; sourceTree = ""; }; 20F43DE118A2F667007D3621 /* GTRepository+Blame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Blame.h"; sourceTree = ""; }; @@ -782,6 +788,19 @@ name = Resources; sourceTree = ""; }; + 15CDDA5D2426568C00FC081A /* macOS */ = { + isa = PBXGroup; + children = ( + 15CDDA5E2426568C00FC081A /* macOS-Application.xcconfig */, + 15CDDA5F2426568C00FC081A /* macOS-Framework.xcconfig */, + 15CDDA602426568C00FC081A /* macOS-StaticLibrary.xcconfig */, + 15CDDA612426568C00FC081A /* macOS-Base.xcconfig */, + 15CDDA622426568C00FC081A /* macOS-XCTest.xcconfig */, + 15CDDA632426568C00FC081A /* macOS-DynamicLibrary.xcconfig */, + ); + path = macOS; + sourceTree = ""; + }; 306123A817EA5261006591D4 /* extobjc */ = { isa = PBXGroup; children = ( @@ -1035,6 +1054,7 @@ D0A463D517E57C45000F5021 /* Base */, D0D81862174421EB00995A2E /* iOS */, D0D81866174421EB00995A2E /* Mac OS X */, + 15CDDA5D2426568C00FC081A /* macOS */, D0D8186C174421EB00995A2E /* README.md */, ); name = Configuration; @@ -1694,7 +1714,7 @@ /* Begin XCBuildConfiguration section */ 1DEB91AE08733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; + baseConfigurationReference = 15CDDA5F2426568C00FC081A /* macOS-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1723,7 +1743,7 @@ }; 1DEB91AF08733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; + baseConfigurationReference = 15CDDA5F2426568C00FC081A /* macOS-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1878,7 +1898,7 @@ }; 88F05A8016011E5400B7AD1D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F81B6B54207B0A9F00AB0836 /* Mac-XCTest.xcconfig */; + baseConfigurationReference = 15CDDA622426568C00FC081A /* macOS-XCTest.xcconfig */; buildSettings = { CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1904,7 +1924,7 @@ }; 88F05A8116011E5400B7AD1D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D81867174421EB00995A2E /* Mac-Application.xcconfig */; + baseConfigurationReference = 15CDDA5E2426568C00FC081A /* macOS-Application.xcconfig */; buildSettings = { CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1963,7 +1983,7 @@ }; D019778E19F830F500F523DA /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; + baseConfigurationReference = 15CDDA5F2426568C00FC081A /* macOS-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1992,7 +2012,7 @@ }; D019778F19F830F500F523DA /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F81B6B54207B0A9F00AB0836 /* Mac-XCTest.xcconfig */; + baseConfigurationReference = 15CDDA622426568C00FC081A /* macOS-XCTest.xcconfig */; buildSettings = { CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -2038,7 +2058,7 @@ }; D019779219F830F500F523DA /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */; + baseConfigurationReference = 15CDDA602426568C00FC081A /* macOS-StaticLibrary.xcconfig */; buildSettings = { PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2183,7 +2203,7 @@ }; D03FC3D81602E97F00BCFA73 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; + baseConfigurationReference = 15CDDA5F2426568C00FC081A /* macOS-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -2212,7 +2232,7 @@ }; D03FC3DA1602E97F00BCFA73 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D81867174421EB00995A2E /* Mac-Application.xcconfig */; + baseConfigurationReference = 15CDDA5E2426568C00FC081A /* macOS-Application.xcconfig */; buildSettings = { CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -2233,7 +2253,7 @@ }; D03FC3DB1602E97F00BCFA73 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */; + baseConfigurationReference = 15CDDA602426568C00FC081A /* macOS-StaticLibrary.xcconfig */; buildSettings = { PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2249,7 +2269,7 @@ }; D0A330EF16027F1E00A616FA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */; + baseConfigurationReference = 15CDDA602426568C00FC081A /* macOS-StaticLibrary.xcconfig */; buildSettings = { PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2257,7 +2277,7 @@ }; D0A330F016027F1E00A616FA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */; + baseConfigurationReference = 15CDDA602426568C00FC081A /* macOS-StaticLibrary.xcconfig */; buildSettings = { PRODUCT_NAME = "$(TARGET_NAME)"; }; From ee3062e7886178ac942bcb62dcd2e8a58898da86 Mon Sep 17 00:00:00 2001 From: vvveiii Date: Sat, 21 Mar 2020 22:18:41 +0800 Subject: [PATCH 16/17] Remove deprecated xcconfigs --- .../project.pbxproj | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 2ce1e9527..040cd4c32 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -634,11 +634,6 @@ D0D81863174421EB00995A2E /* iOS-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Application.xcconfig"; sourceTree = ""; }; D0D81864174421EB00995A2E /* iOS-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Base.xcconfig"; sourceTree = ""; }; D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-StaticLibrary.xcconfig"; sourceTree = ""; }; - D0D81867174421EB00995A2E /* Mac-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Application.xcconfig"; sourceTree = ""; }; - D0D81868174421EB00995A2E /* Mac-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Base.xcconfig"; sourceTree = ""; }; - D0D81869174421EB00995A2E /* Mac-DynamicLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-DynamicLibrary.xcconfig"; sourceTree = ""; }; - D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Framework.xcconfig"; sourceTree = ""; }; - D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-StaticLibrary.xcconfig"; sourceTree = ""; }; D0D8186C174421EB00995A2E /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = ""; }; D0F4E28917C7F24200BBDE30 /* NSErrorGitSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSErrorGitSpec.m; sourceTree = ""; }; DD3D9510182A81E1004AF532 /* GTBlame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTBlame.h; sourceTree = ""; }; @@ -647,7 +642,6 @@ DD3D951B182AB25C004AF532 /* GTBlameHunk.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlameHunk.m; sourceTree = ""; }; F81B6B51207B0A7700AB0836 /* Extension.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Extension.xcconfig; sourceTree = ""; }; F81B6B53207B0A8B00AB0836 /* iOS-Extension.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Extension.xcconfig"; sourceTree = ""; }; - F81B6B54207B0A9F00AB0836 /* Mac-XCTest.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-XCTest.xcconfig"; sourceTree = ""; }; F879D82F1B4B77F4002D5C07 /* Libgit2FeaturesSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Libgit2FeaturesSpec.m; sourceTree = ""; }; F879D8361B4B7F7C002D5C07 /* ObjectiveGit-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ObjectiveGit-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; F8D1BDEC1B31FE7C00CDEC90 /* GTRepository+Pull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Pull.h"; sourceTree = ""; }; @@ -1053,7 +1047,6 @@ children = ( D0A463D517E57C45000F5021 /* Base */, D0D81862174421EB00995A2E /* iOS */, - D0D81866174421EB00995A2E /* Mac OS X */, 15CDDA5D2426568C00FC081A /* macOS */, D0D8186C174421EB00995A2E /* README.md */, ); @@ -1073,19 +1066,6 @@ path = iOS; sourceTree = ""; }; - D0D81866174421EB00995A2E /* Mac OS X */ = { - isa = PBXGroup; - children = ( - D0D81867174421EB00995A2E /* Mac-Application.xcconfig */, - D0D81868174421EB00995A2E /* Mac-Base.xcconfig */, - D0D81869174421EB00995A2E /* Mac-DynamicLibrary.xcconfig */, - D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */, - D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */, - F81B6B54207B0A9F00AB0836 /* Mac-XCTest.xcconfig */, - ); - path = "Mac OS X"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ From 922bca5e949b7398bc166a706cc3e0d25067f646 Mon Sep 17 00:00:00 2001 From: vvveiii Date: Sat, 21 Mar 2020 22:26:02 +0800 Subject: [PATCH 17/17] Add `External/build` to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index dc2f3d3ef..faa84754a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ External/libssh2-ios Carthage/Build +External/build