Skip to content

Commit

Permalink
Merge pull request #5 from cats-oss/spm_support
Browse files Browse the repository at this point in the history
SPM support
  • Loading branch information
ra1028 authored Apr 3, 2019
2 parents dd483ab + c6fd6be commit 52c0a95
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 18 deletions.
1 change: 1 addition & 0 deletions .swift_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: generic
os: osx
osx_image: xcode10
osx_image: xcode10.2
before_install:
- gem install xcpretty
script:
Expand Down
4 changes: 2 additions & 2 deletions AcknowledgementsPlist.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'AcknowledgementsPlist'
s.version = '0.0.3'
s.version = '0.0.4'
s.summary = 'AcknowledgementsPlist manages the licenses of libraries that depend on your iOS app.'
s.homepage = 'https://github.com/cats-oss/AcknowledgementsPlist'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Takuma Horiuchi' => '[email protected]' }
s.source = { http: "#{s.homepage}/releases/download/#{s.version}/AcknowledgementsPlist.zip" }
s.source = { http: "#{s.homepage}/releases/download/#{s.version}/portable_acknowledgementsplist.zip" }
s.preserve_paths = '*'
s.exclude_files = "**/file.zip"
end
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
TEMP_ZIP_DIR=./tmp/portable_zip
SWIFT_BIN_DIR=$(shell swift build -c release --show-bin-path)
BIN_NAME=acknowledgementsplist

.PHONY: project release_build portable_zip

project:
swift package generate-xcodeproj

release_build:
swift build -c release

portable_zip: release_build
mkdir -p $(TEMP_ZIP_DIR)
cp -f $(SWIFT_BIN_DIR)/$(BIN_NAME) $(TEMP_ZIP_DIR)
cp -f LICENSE $(TEMP_ZIP_DIR)
(cd $(TEMP_ZIP_DIR); zip -yr - $(BIN_NAME) LICENSE) > ./portable_acknowledgementsplist.zip
rm -rf $(TEMP_ZIP_DIR)
20 changes: 12 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.0

import PackageDescription

let package = Package(
name: "AcknowledgementsPlist",
products: [
.executable(name: "acknowledgementsplist", targets: ["acknowledgementsplist"])
],
dependencies: [
.package(url: "https://github.com/kylef/Commander.git",
from: "0.8.0")
.package(url: "https://github.com/kylef/Commander.git", from: "0.8.0")
],
targets: [
.target(
name: "AcknowledgementsPlist",
dependencies: ["Commander", "AcknowledgementsPlistCore"]),
name: "acknowledgementsplist",
dependencies: ["Commander", "AcknowledgementsPlistCore"]
),
.target(
name: "AcknowledgementsPlistCore",
dependencies: []),
dependencies: []
),
.testTarget(
name: "AcknowledgementsPlistTests",
dependencies: ["AcknowledgementsPlist"]),
dependencies: ["acknowledgementsplist"]
),
]
)
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ I implement it so that it will be completed locally!
</table>

## Requirements
- Xcode 10
- Swift 4.2
- Xcode 10.2+
- Swift 5+

## How to install
#### CocoaPods
Expand All @@ -37,9 +37,9 @@ I think that you can execute it after `Pods` or `Carthage` is updated.

### Usage
```
./AcknowledgementsPlist [PROJECT_ROOT_PATH] [OUTPUT_PATH] [OPTIONS]
acknowledgementsplist [PROJECT_ROOT_PATH] [OUTPUT_PATH] [OPTIONS]
e.g. ./AcknowledgementsPlist . ./Sample-Acknowledgements.plist --manual-plist-path ./ManualAcknowledgements.plist
e.g. acknowledgementsplist . ./Sample-Acknowledgements.plist --manual-plist-path ./ManualAcknowledgements.plist
```

#### `[PROJECT_ROOT_PATH]`
Expand Down Expand Up @@ -93,7 +93,7 @@ e.g. ./AcknowledgementsPlist . ./Sample-Acknowledgements.plist --manual-plist-pa
If `Carthage/Checkouts` does not exist, execute the command of `carthage checkout`.

2. Determine the location of the `AcknowledgementsPlist` and the output location of `Plist`.
e.g. `./AcknowledgementsPlist . ./Sample/Resources/Sample-Acknowledgements.plist`
e.g. `acknowledgementsplist . ./Sample/Resources/Sample-Acknowledgements.plist`

### Make Bundle
1. Please do `1.` of Make Plist.
Expand Down Expand Up @@ -122,7 +122,7 @@ e.g. `./AcknowledgementsPlist . ./Sample/Resources/Sample-Acknowledgements.plist
```

3. Determine the location of the `AcknowledgementsPlist` and the output location of `Bundle`.
e.g. `./AcknowledgementsPlist . ./Sample/Resources/Settings.bundle`
e.g. `acknowledgementsplist . ./Sample/Resources/Settings.bundle`

## LICENSE
Under the MIT license. See [LICENSE](https://github.com/cats-oss/AcknowledgementsPlist/blob/master/LICENSE) file for details.
2 changes: 1 addition & 1 deletion Sample/Scripts/make-acknowledgements-plist.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

PROJECT_ROOT_PATH=./..
ACK_PLIST_EXE=${PROJECT_ROOT_PATH}/Pods/AcknowledgementsPlist/AcknowledgementsPlist
ACK_PLIST_EXE=${PROJECT_ROOT_PATH}/Pods/AcknowledgementsPlist/acknowledgementsplist
OUTPUT_PLIST_PATH=./Sample/Resources/Sample-Acknowledgements.plist
OUTPUT_BUNDLE_PATH=./Sample/Resources/Settings.bundle
MANUAL_ACK_PATH=./Sample/Resources/ManualAcknowledgements.plist
Expand Down

0 comments on commit 52c0a95

Please sign in to comment.