Commit Graph

81 Commits

Author SHA1 Message Date
Matt Rubin
80f4e60071 Move the Result shims out of the library and into the test target 2019-04-14 19:53:00 -04:00
Matt Rubin
19e24dd7d8 Replace antitypical/Result with the standard library Result type 2019-04-14 17:42:37 -04:00
Matt Rubin
56b3907ecf Upgrade xcconfigs 2019-04-12 00:31:09 -04:00
Matt Rubin
53438583ca Migrate all targets to Swift 5 2019-04-12 00:22:04 -04:00
Matt Rubin
a8d0000168 Update project localization settings as recommended by Xcode 10.2 2019-04-11 20:21:04 -04:00
Matt Rubin
ef9a46c86b Upgrade xcconfigs to include Xcode 10.1's recommended build settings 2019-04-11 19:56:04 -04:00
Matt Rubin
e65206c00c Migrate all targets to Swift 4.2 2019-04-11 19:42:48 -04:00
Matt Rubin
f811db8047 Bump the macOS tests deployment target to match the Nimble dependency 2019-04-11 19:33:56 -04:00
Yifei Teng
fb2fa2b5bc fix iOS test failure due to one of the test fixture not being included in the build 2018-04-30 18:07:34 -05:00
Jake Van Alstyne
d35dac654c
Merge pull request #102 from jakeva/develop
Implement git status and diffs
2018-02-09 15:53:45 -07:00
Matt Diephouse
c5f3b2ccfe Don't set custom permissions or ownership for deployment 2018-01-25 14:32:22 -05:00
Matt Diephouse
28a1757dbe Fix header interface generation
https://twitter.com/benlangmuir/status/943239006627684352
2017-12-19 16:58:51 -05:00
Jake Van Alstyne 🎩
d8ee830173 Merge branch 'master' into develop 2017-12-15 13:40:42 -07:00
Matt Diephouse
09ac23471b Fix build with Xcode 9.2 2017-12-14 15:08:17 -05:00
Jake Van Alstyne 🎩
efe1d6eeeb update for swift 4.0 nuances 2017-11-10 15:21:35 -07:00
Jake Van Alstyne 🎩
6fc4a0c7bb improve tests, make clear some of the status/diff data is optional, clearer naming 2017-08-22 13:42:06 -06:00
Jake Van Alstyne 🎩
b582e1e642 Add diff structs for parsing git_diff_deltas into Swift, more testing 2017-08-20 15:48:17 -06:00
Jake Van Alstyne 🎩
82e90d3c75 stub out status testing 2017-08-17 16:48:58 -06:00
Arnon Keereena
de2984c695 Move CommitIterator to its own file, untested 2017-04-28 09:44:10 +02:00
Arnon Keereena
18ee34f681 Fix per comment
- Move allCommits to Repository class
- Remove unwanted spaces
- Restore --lenient flag, even though it still produce compile error
2017-04-27 07:56:56 +02:00
Arnon Keereena
20365249f9 Add ability to get all commits from a branch 2017-04-25 20:52:59 +02:00
Matt Rubin
f10c8d03dd Run the SwiftLint build phase with the --lenient flag
Running SwiftLint in "lenient" mode will only generate warnings, preventing the linter from causing the build to fail.
https://github.com/realm/SwiftLint/issues/1322
2017-04-23 23:24:53 -04:00
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