Commit Graph

59 Commits

Author SHA1 Message Date
Matt Rubin
b660b09c7a Add a target which just runs SwiftLint, and add it to both schemes 2016-12-18 14:04:25 -05:00
Matt Rubin
f97fcfab38 Convert source and tests to build with Swift 3 2016-12-17 00:22:08 -05:00
Matt Rubin
869fb17c8b Clean up static library build settings (and the names of the products)
The static library dependencies are built by external scripts, and do not use the naming settings specified here. However, Xcode uses the PRODUCT_NAME setting to generate the name of the placeholder product reference it creates automatically for each target.Specifying the base names of each static library in the build settings causes Xcode to generate names for its placeholder products which match the products that are actually built by the scripts.
2016-12-15 18:25:04 -05:00
Matt Rubin
fe97151d16 Use the correct Info.plist for the iOS test target 2016-12-15 18:01:56 -05:00
Matt Rubin
d38954516a Enable bitcode for the iOS framework
Bitcode is already enabled for the static library dependencies.
2016-12-15 17:58:56 -05:00
Matt Rubin
2289706481 Remove unnecessary SUPPORTED_PLATFORMS and VALID_ARCHS build settings 2016-12-15 17:48:07 -05:00
Matt Rubin
c151e05911 Remove extraneous install name and install path build settings 2016-12-15 17:46:16 -05:00
Matt Rubin
dc8a391290 Clean up search path build settings 2016-12-15 17:38:33 -05:00
Matt Rubin
717abc1cb3 Remove unnecessary or overridden project build settings 2016-12-15 17:14:11 -05:00
Matt Rubin
ae34822fab Delete unused versioning build settings 2016-12-15 17:09:36 -05:00
Matt Rubin
236712b9d3 Set xcconfigs for static libraries and remove duplicated build settings 2016-12-15 17:06:37 -05:00
Matt Rubin
c4c40f5173 Delete target build settings which duplicate settings from the xcconfigs 2016-12-15 17:01:14 -05:00
Matt Rubin
eee3ca4446 Delete project build settings which duplicate settings from the xcconfig 2016-12-15 16:57:57 -05:00
Matt Rubin
7ffe3bbb3b Remove FRAMEWORK_SEARCH_PATHS from test targets
These extra search paths were unnecessary and causing warnings from the linker.
2016-12-15 16:24:21 -05:00
Matt Rubin
a4072adf1e Remove libgit2 group and modulemap file reference from the Xcode project 2016-12-13 05:24:48 -05:00
Matt Rubin
c2535ace3f Add a libgit2 modulemap and remove the libgit2 headers from SwiftGit2 2016-12-13 04:27:38 -05:00
Matt Rubin
c6a8c01c87 Set low project deployment targets
This allows other projects which use SwiftGit2 more flexibility in their own deployment targets.
2016-12-10 16:43:31 -08:00
Matt Rubin
a4b15a2f6c Remove deprecated EMBEDDED_CONTENT_CONTAINS_SWIFT build setting
This old build setting (like its replacement, ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES) is only needed for a target which does not contain any Swift code, but which embeds or tests another target which does contain Swift.
2016-12-10 16:41:30 -08:00
Matt Rubin
f888eefb09 Don't copy git2.h with the framework's public headers
As of https://github.com/SwiftGit2/SwiftGit2/pull/60, the git2.h header no longer needs to be public.
This change silences a warning that "Umbrella header for module 'SwiftGit2' does not include header '.../git2.h'".
2016-12-10 16:41:21 -08:00
Matt Rubin
7c9bac1ca1 Set common deployment targets for the whole Xcode project
Setting the iOS deployment target at the project level ensures the IPHONEOS_DEPLOYMENT_TARGET environment variable is available to the scripts which build the external libraries.
Before this change, linking the external libraries with SwiftGit2-iOS resulted in hundreds of warnings that "object file (...) was built for newer iOS version (10.1) than being linked (9.2)".
2016-12-10 16:41:04 -08:00
Matt Rubin
e735a7d4cb Update project, source, and tests to build with Swift 2.3 2016-12-06 12:43:03 -05:00
Tom Booth
60cb395cc6 Add cloneFromURL function
This introduces a new static function on Repository that will allow a
user to clone a local or remote repository.

At the moment only SSH in-memory, username + password and default (no
creds) are implemented.

It provides an enum wrapper around the underlying libgit2 `git_cred_t`
type to abstract it away from the user into something that is a little
more Swift-like. As much of the C callback code and struct creation has
been moved into Swift-land as well, this is now possible as of 2.*
whereas before it was not.

I had to use a wrapper class in Credentials.swift in order to convert
blocks to pointers, as blocks do not implement the AnyObject protocol
that `Unmanaged` requies.

The test requires you passing through a set of environment variables
otherwise it will not run. This is so that secret/private information
isn't leaked into the repository. The required variables are as follows:

   - SG2TestPrivateRepo - the url of the private jrepo to clone;
   - SG2TestUsername - the url of the user that will be connecting;
   - SG2TestPublicKey - the public key data to be used;
   - SG2TestPrivateKey - the private key data;
   - SG2TestPassphrase - passphrase needed to use the private key (blank
     if none).
2016-04-07 14:50:38 +01:00
Matt Diephouse
1d28313725 Merge pull request #54 from tombooth/libgit2-to-v0.23.4
Upgrade libgit2 to v0.23.4
2016-02-27 18:40:48 -05:00
Tom Booth
8ea6f56fa0 Upgrade libgit2 to v0.23.4
The main reason for the upgrade is to enable use of SecureTransport for
https transport.

You can find a full diff here:

7c63a33ffe...e8feafe320

and the changelog changes:

7c63a33ffe...e8feafe320 (diff-4ac32a78649ca5bdd8e0ba38b7006a1e)
2016-02-26 16:20:37 +00:00
Tom Booth
433ef719eb Correct the dependency between openssl and libssh2
Previously, libgit2 was depending on both openssl and libssh2. This was
incorrect as libssh2 requires openssl for its build phase. I have moved
the openssl dependency back to libssh2.

I was testing using the scripts/cibuild executable, which masks any
dependency issues with openssl as it prebuilds it. This prebuilding was
done to get around TravisCI timeouts and so can't be removed to stop
this being missed again.
2016-02-23 18:26:00 +00:00
Tom Booth
6c0e55f3ca Structure xcode project for iOS
The commit contains all of the reconfiguration of the XCode project to
create a new iOS target and scheme. This follows, but occasionally
deviates from, the changes made in
https://github.com/SwiftGit2/SwiftGit2/pull/44. A couple of more
specific notes:

  - Disabled bitcode on iOS framework as the builds further down the
    chain won't currently generate bitcode. Not currently an issue but
    when Apple decided App Store can only contain bitcode it will be.
  - Update .gitignore to include directories generated as part of
    building openssl, libssh2 and libgit2. These are created as part of
    the build scripts borrowed from objective-git
  - Splits iOS/Mac libraries used into different groups for clarities
    sake
  - Set the debug and release configurations for the new targets to iOS
    Framework and Application
2016-02-22 11:17:41 +00:00
Tom Booth
aec66f930c Use ZipArchive to extract fixtures for tests
The current method used by this library uses NSTask to spin up an
externally running task to unzip the fixtures, this will not work on iOS
as this functionality is not allowed. Switching to use ZipArchive, as
noted by @modocache, provides a portable way of extracting fixtures.
2016-02-16 16:51:49 +00:00
Matt Diephouse
4149f2ce5d Set a higher deployment target for the tests
Guanaco seems to require 10.11+.
2016-01-17 11:26:02 -05:00
Markos Charatzas
5c8a6000c4 updated to Swift 2.0
updated to Xcode 7.2 recommended settings
integrated with Nimble (v3.0.0), Quick (v0.8.0), Result (1.0.1)
integrated with Guanaco (5031bf67297afbe61ac0f2fbf3e3e8400b3f8888) that supports Swift 2.0
2016-01-16 14:57:32 +00:00
Matt Diephouse
6e737b1190 Update to antitypical/Result 0.3 2015-04-20 19:51:27 -04:00
Matt Diephouse
03032d0074 Switch from LlamaKit to antitypical/Result 2015-04-15 21:32:10 -04:00
Matt Diephouse
7d32dbd36e Undo this linker flag 2015-04-13 22:27:02 -04:00
Matt Diephouse
bfe2d6d053 Add checkout strategies 2015-04-02 21:01:44 -04:00
Matt Diephouse
38ba66f80d Manage dependencies with Carthage 2015-03-08 16:30:30 -04:00
Brian Gesiak
186b5aadc9 .gitmodules: Xcode 6.3b2 updates
- Update submodules to eliminate new warnings, errors in Xcode 6.3b2.
- COpaquePointer.null() no longer available; instantiate with nil literal
  instead.
- Fix warning when chaining optionals and optional casts.
2015-03-07 12:43:38 -05:00
Matt Diephouse
90ecfc3166 Sort Errors.swift alphabetically in project 2015-03-07 12:43:38 -05:00
Matt Diephouse
a1cdaf4422 Only copy the libgit2 headers that we need 2015-03-07 12:43:38 -05:00
Matt Diephouse
2d0c0765fc Add Repository.HEAD() 2015-03-07 12:43:37 -05:00
Brian Gesiak
ba9a951b62 Support Swift 1.2
- Update Guanaco, LlamaKit, Nimble, and Quick to versions that support
  Swift 1.2.
- Update Xcode project and scheme files for "latest Xcode version"
  parameters.
- Use Swift 1.2's new fallible casts for casts that may fail at runtime.
2015-02-21 21:28:43 -05:00
Brian Gesiak
7d6409a406 .gitmodules: Add Nimble
Instead of relying on the version of Nimble that Quick uses for its test
target, use a top-level submodule to version Nimble.
2015-02-20 01:47:49 -05:00
Brian Gesiak
17022d69d8 Repository: Propagate libgit2 errors
Instead of returning the default LlamaKit error, return the underlying
libgit2 error when Repository.atURL fails.
2015-02-19 13:37:38 -05:00
Brian Gesiak
908f774cc8 .gitmodules: Add Guanaco
Guanaco provides Nimble assertions for LlamaKit.Result, such as:

```
expect(result).to(haveFailed(domain: "com.libgit2"))
```

These custom assertions will be useful when testing that libgit2 error
messages are properly captured and reported.
2015-02-18 00:14:14 -05:00
Matt Diephouse
8b92b6f9ca Implement objectWithOID 2015-01-11 14:19:04 -08:00
Matt Diephouse
4a0b5cd838 Add Remotes 2015-01-03 09:43:42 -05:00
Matt Diephouse
e40e19a3fc Create files for remotes 2015-01-02 14:28:53 -05:00
Matt Diephouse
ecea586f73 Create files for references 2015-01-02 10:34:06 -05:00
Matt Diephouse
c9e8e3d36f Move pointers to their own file 2014-12-23 13:10:12 -10:00
Matt Diephouse
87e5914d89 Configure the project to use tabs 2014-12-19 16:46:26 -10:00
Matt Diephouse
b4dac5a6be Look up commits in the repository 2014-12-05 15:27:35 -05:00
Matt Diephouse
692a103ca7 Add an OID type 2014-11-18 20:48:28 -05:00