Skip to content

Commit

Permalink
Merge pull request #12 from master-nevi/master
Browse files Browse the repository at this point in the history
Add SwiftPM and Github actions support
  • Loading branch information
dbgrandi authored Nov 5, 2021
2 parents 19eb9a6 + 69e4902 commit 94580ae
Show file tree
Hide file tree
Showing 14 changed files with 113 additions and 38 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "DBGHTMLEntities CI"

on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
Example:
name: Example Project (Latest Stable Xcode)
runs-on: macOS-11
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.4.0
with:
xcode-version: latest-stable

- name: Run pod install
run: pod install --project-directory=Example

- name: Build Project
uses: sersoft-gmbh/xcodebuild-action@v1.8.0
with:
workspace: Example/DBGHTMLEntitiesExample.xcworkspace
scheme: DBGHTMLEntitiesExample
destination: name=iPhone 13 Pro
action: test

Pods:
name: Cocoapods Lint (Latest Stable Xcode)
runs-on: macOS-11
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.4.0
with:
xcode-version: latest-stable

- name: Run pod lib lint
run: pod lib lint --fail-fast

SwiftPM:
name: SwiftPM (Latest Stable Xcode)
runs-on: macOS-11
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.4.0
with:
xcode-version: latest-stable

- name: Build
run: swift build
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ Pods/
# bundler
.bundle/
vendor/

# Swift Package Manager
.build/
.swiftpm/
Package.resolved
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Classes/DBGHTMLEntityDecoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (c) 2014 David Grandinetti. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DBGHTMLEntityDecoder.h"
#import "DBGHTMLEntityDecoder+Private.h"
#import "DBGHTMLEntityDecodeMap.h"
Expand Down
1 change: 1 addition & 0 deletions Classes/DBGHTMLEntityEncodeMap.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (c) 2014 David Grandinetti. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DBGHTMLEntityEncodeMap.h"
#import "DBGHTMLEntityDecodeMap.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright (c) 2014 David Grandinetti. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DBGHTMLEntityDecodeMap : NSObject

/**
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* The default encoder uses Named | Decimal, favoring Named if a
* mapping exists.
*/
#import <Foundation/Foundation.h>

typedef NS_OPTIONS(NSUInteger, DBGHTMLEntityEncoderFormats) {
DBGHTMLEntityEncoderNamedFormat = 1 << 0,
DBGHTMLEntityEncoderDecimalFormat = 1 << 1,
Expand Down
13 changes: 5 additions & 8 deletions DBGHTMLEntities.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "DBGHTMLEntities"
s.version = "1.1.1"
s.version = "1.2.0"
s.summary = "Easily Decode/Encode HTML entity strings (e.g. &amp;)"
s.description = <<-DESC
Easily Decode/Encode HTML entity strings (e.g. &amp;). Tested, and with a sexy LICENSE.
Expand All @@ -12,14 +12,11 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/dbgrandi/DBGHTMLEntities.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/dbgrandi'

s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.8'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'

s.requires_arc = true

s.source_files = 'Classes'
s.private_header_files = "Classes/**/*+Private.h"
s.public_header_files = 'Classes/**/*.h'
s.source_files = 'Classes/**/*.{h,m}'
s.public_header_files = 'Classes/include/*.h'
end
16 changes: 4 additions & 12 deletions Example/DBGHTMLEntitiesExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -323,21 +323,17 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DBGHTMLEntitiesExample/Pods-DBGHTMLEntitiesExample-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-DBGHTMLEntitiesExample/Pods-DBGHTMLEntitiesExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DBGHTMLEntities/DBGHTMLEntities.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBGHTMLEntities.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DBGHTMLEntitiesExample/Pods-DBGHTMLEntitiesExample-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DBGHTMLEntitiesExample/Pods-DBGHTMLEntitiesExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
463E6CFDF037C7FB32A736C9 /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -389,25 +385,21 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DBGHTMLEntitiesExampleTests/Pods-DBGHTMLEntitiesExampleTests-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-DBGHTMLEntitiesExampleTests/Pods-DBGHTMLEntitiesExampleTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DBGHTMLEntities/DBGHTMLEntities.framework",
"${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework",
"${BUILT_PRODUCTS_DIR}/Specta/Specta.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBGHTMLEntities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Specta.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DBGHTMLEntitiesExampleTests/Pods-DBGHTMLEntitiesExampleTests-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DBGHTMLEntitiesExampleTests/Pods-DBGHTMLEntitiesExampleTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '11.0'
platform :ios, '12.0'
use_frameworks!

target :DBGHTMLEntitiesExample do
Expand Down
10 changes: 5 additions & 5 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- DBGHTMLEntities (1.1.0)
- DBGHTMLEntities (1.2.0)
- Expecta (1.0.6)
- Specta (1.0.7)

Expand All @@ -9,7 +9,7 @@ DEPENDENCIES:
- Specta (~> 1.0)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
trunk:
- Expecta
- Specta

Expand All @@ -18,10 +18,10 @@ EXTERNAL SOURCES:
:path: "../DBGHTMLEntities.podspec"

SPEC CHECKSUMS:
DBGHTMLEntities: 5b601f2bcb5d67bccca753456516260b7324aadf
DBGHTMLEntities: 9a169079970f97228098b85f3f7050d908a921c5
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66

PODFILE CHECKSUM: c6f227608486edaaa393b8408b22cbe878ab6b8e
PODFILE CHECKSUM: eb6b11c2c81dfdccbea3ee6550d8e35b00739325

COCOAPODS: 1.5.3
COCOAPODS: 1.11.2
24 changes: 24 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// swift-tools-version:5.3

import PackageDescription

let package = Package(
name: "DBGHTMLEntities",
platforms: [
.iOS(.v9),
.tvOS(.v9),
.watchOS(.v2),
.macOS(.v10_10)
],
products: [
.library(
name: "DBGHTMLEntities",
targets: ["DBGHTMLEntities"]),
],
dependencies: [],
targets: [
.target(
name: "DBGHTMLEntities",
path: "Classes"),
]
)

0 comments on commit 94580ae

Please sign in to comment.