Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
use dduan/DistributedTests directly, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
dduan committed Oct 21, 2016
1 parent 53a39d0 commit bfe97ab
Show file tree
Hide file tree
Showing 119 changed files with 103 additions and 135 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions DistributionTests/Carthage/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git "https://github.com/JustHTTP/Just.git" "master"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>net.JustHTTP.Example-iOS.watchkitapp</string>
<string>com.example.Example-iOS.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string>net.JustHTTP.Example-iOS</string>
<string>com.example.Example-iOS</string>
<key>WKWatchKitApp</key>
<true/>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-iOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand Down Expand Up @@ -685,7 +685,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-iOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down Expand Up @@ -743,7 +743,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-iOS.watchkitapp.watchkitextension";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-iOS.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -796,7 +796,7 @@
INFOPLIST_FILE = "Example-watchOS-Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-iOS.watchkitapp.watchkitextension";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-iOS.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -853,7 +853,7 @@
INFOPLIST_FILE = "Example-watchOS/Info.plist";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-iOS.watchkitapp";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-iOS.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -903,7 +903,7 @@
IBSC_MODULE = Example_watchOS_Extension;
INFOPLIST_FILE = "Example-watchOS/Info.plist";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-iOS.watchkitapp";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-iOS.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -965,7 +965,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-tvOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand Down Expand Up @@ -1019,7 +1019,7 @@
INFOPLIST_FILE = "Example-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-tvOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down Expand Up @@ -1080,7 +1080,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-macOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand Down Expand Up @@ -1132,7 +1132,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-macOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
2 changes: 2 additions & 0 deletions DistributionTests/Cocoapods/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Pods
Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>net.JustHTTP.Example.watchkitapp</string>
<string>com.example.Example.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import WatchKit
import Foundation
import Just

class InterfaceController: WKInterfaceController {}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string>net.JustHTTP.Example</string>
<string>com.example.Example</string>
<key>WKWatchKitApp</key>
<true/>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = JustHTTP;
ORGANIZATIONNAME = Example;
TargetAttributes = {
372C014B1DA97C5D009C0D56 = {
CreatedOnToolsVersion = 8.0;
Expand Down Expand Up @@ -767,7 +767,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
IBSC_MODULE = Example_watchOS_Extension;
INFOPLIST_FILE = "Example-watchOS/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = net.JustHTTP.Example.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = com.example.Example.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -784,7 +784,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
IBSC_MODULE = Example_watchOS_Extension;
INFOPLIST_FILE = "Example-watchOS/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = net.JustHTTP.Example.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = com.example.Example.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -802,7 +802,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
INFOPLIST_FILE = "Example-watchOS-Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.JustHTTP.Example.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = com.example.Example.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -820,7 +820,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
INFOPLIST_FILE = "Example-watchOS-Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.JustHTTP.Example.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = com.example.Example.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -839,7 +839,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = "Example-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-tvOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 3.0;
Expand All @@ -857,7 +857,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = "Example-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-tvOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 3.0;
Expand All @@ -877,7 +877,7 @@
INFOPLIST_FILE = "Example-macOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-macOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
Expand All @@ -895,7 +895,7 @@
INFOPLIST_FILE = "Example-macOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = "net.JustHTTP.Example-macOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.Example-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
Expand Down Expand Up @@ -1006,7 +1006,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = "$(SRCROOT)/Example-iOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.JustHTTP.Example;
PRODUCT_BUNDLE_IDENTIFIER = com.example.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
Expand All @@ -1021,7 +1021,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = "$(SRCROOT)/Example-iOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.JustHTTP.Example;
PRODUCT_BUNDLE_IDENTIFIER = com.example.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions DistributionTests/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2016 Daniel Duan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes.
60 changes: 60 additions & 0 deletions DistributionTests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## What is this?

Each Swift project in this repository uses a different package manager to
satisfy dependency on the same library. A successful build of a project
indicates the library's support for the manager is working.

A *Makefile* is included to help automate the building process.

## Who can benefit from this?

Author of an open-source Swift 3 library. The library is distributed with any
combination of Cocoapods, Carthage and Swift Package Manager. They want to
ensure supports for them keep working throughout development.

## How does it work?

1. Download this project either directly or via `git clone`.
2. Specify the library to test. Three things about the library is required: its
name, git URL and a major version number. The script `customize` takes
these and inject them to each test projects. To test [Just][Just], for
example:

```
./customize --name Just --git "https://github.com/JustHTTP/Just.git" --major 0
```
3. Run `make`. This will build projects for each aforementioned package
manager by fetching the library and import it for various platforms that
Xcode/Swift supports. There's a make command for each package
manager/platform combination as well. For example, you can run `make
test-integration-carthage-tvOS`.
4. Make this part of your library's continuous integration. Do step 1-3 as
part of continoues integration script. Better yet, include it as part of
your library structure. The *make* commands are going to be handy.
## Does it work for your library?
There are a few assumptions for the library being tested: it must have
a consistent name for the framework file (`Just`.framework) and import symbol
(import `Just`) on all platforms. So if the packager
build`Just-tvOS.framework` but user writes `import Just` in their code, that
won't work.
Out of the box, all three package managers (Cocoapods, Carthage, Swift Package
Manager) and four platforms (iOS, macOS, watchOS, tvOS) are tested.
Swift package manager projects tests against a major version number.
If your library can't fit in any of these assumptions, update it, or manually
edit content of projects here for your needs (don't forget to update the
Makefile as well, it's pretty straight forward). Examples:
* if you don't support Carthage, delete the Carthage folder and related
contents in Makefile.
* if you don't support watchOS, open both `Example` in Xcode and delete the
watchOS target. Then deleted everything related to watchOS in the Makefile.
* If your library get build to a name other than its import symbol, remove the
pre-existing ones from the Xcode projects and add them manually.
* If you need to target a minor version number, add it in `SPM/Package.swift`.
[Just]: https://github.com/JustHTTP/Just.git
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion Example/Carthage/Cartfile

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion Just.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |s|

s.name = "Just"
s.version = "0.5.4"
s.version = "0.5.5"
s.summary = "Swift HTTP for Humans"

s.description = <<-DESC
Expand Down
Loading

0 comments on commit bfe97ab

Please sign in to comment.