-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from Automattic/release/1.0
Release/1.0
- Loading branch information
Showing
414 changed files
with
3,930 additions
and
15,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
# This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs | ||
ios: wordpress-mobile/ios@0.0.22 | ||
# Using 1.0 of our Orbs means it will use the latest 1.0.x version from https://github.com/wordpress-mobile/circleci-orbs | ||
ios: wordpress-mobile/ios@1.0 | ||
|
||
workflows: | ||
test_and_validate: | ||
jobs: | ||
- ios/test: | ||
name: Test | ||
xcode-version: "11.2.1" | ||
workspace: Gridicons.xcworkspace | ||
scheme: Gridicons | ||
device: iPhone XS | ||
ios-version: "12.1" | ||
bundle-install: false | ||
device: iPhone 11 | ||
ios-version: "13.2.2" | ||
bundle-install: true | ||
pod-install: false | ||
- ios/validate-podspec: | ||
name: Validate Podspec | ||
xcode-version: "11.2.1" | ||
podspec-path: Gridicons.podspec | ||
bundle-install: true | ||
- ios/publish-podspec: | ||
name: Publish to Trunk | ||
xcode-version: "11.2.1" | ||
podspec-path: Gridicons.podspec | ||
bundle-install: true | ||
post-to-slack: true | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.5.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
source 'https://rubygems.org' do | ||
gem 'cocoapods', '1.5.3' | ||
gem 'rake', '~> 13' | ||
gem 'cocoapods', '~> 1.8.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "Gridicons" | ||
s.version = "0.19" | ||
s.version = "1.0" | ||
s.summary = "Gridicons is a tiny framework which generates Gridicon images at any resolution." | ||
|
||
s.homepage = "http://apps.wordpress.com" | ||
s.license = { :type => "GPLv2" } | ||
s.author = { "Automattic" => "mobile@automattic.com" } | ||
s.social_media_url = "http://twitter.com/WordPressiOS" | ||
|
||
s.platform = :ios, "9.0" | ||
s.platform = :ios, "10.0" | ||
s.source = { :git => "https://github.com/Automattic/Gridicons-iOS.git", :tag => s.version.to_s } | ||
|
||
s.source_files = "Gridicons/Gridicons/**/*.swift" | ||
s.source_files = "Gridicons/Gridicons/**/*.swift" | ||
s.resource_bundles = { | ||
'Gridicons': [ | ||
'Gridicons/Gridicons/*.{xcassets}', | ||
] | ||
} | ||
s.requires_arc = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen | ||
{% if catalogs %} | ||
{% set enumName %}{{param.enumName|default:"GridiconType"}}{% endset %} | ||
|
||
{% macro enumBlock assets sp %} | ||
{{sp}} {% call casesBlock assets sp %} | ||
{% endmacro %} | ||
{% macro casesBlock assets sp %} | ||
{{sp}} {% for asset in assets %} | ||
{{sp}} {% if asset.type == "image" %} | ||
{{sp}} case {{asset.name|swiftIdentifier:"pretty"|lowerFirstWord|replace:"Ios","iOS"|escapeReservedKeywords}} | ||
{{sp}} {% endif %} | ||
{{sp}} {% endfor %} | ||
{% endmacro %} | ||
{% macro assetNamesBlock assets sp %} | ||
{{sp}} {% for asset in assets %} | ||
{{sp}} {% if asset.type == "image" %} | ||
{{sp}} case .{{asset.name|swiftIdentifier:"pretty"|lowerFirstWord|replace:"Ios","iOS"|escapeReservedKeywords}}: return "{{asset.name}}" | ||
{{sp}} {% endif %} | ||
{{sp}} {% endfor %} | ||
{% endmacro %} | ||
|
||
@objc | ||
public enum {{enumName}}: Int { | ||
{% call enumBlock catalogs.first.assets " " %} | ||
} | ||
|
||
extension {{enumName}} { | ||
var name: String { | ||
switch self { | ||
{% call assetNamesBlock catalogs.first.assets " " %} | ||
} | ||
} | ||
|
||
var icon: UIImage { | ||
var bundle = Bundle(for: BundleToken.self) | ||
|
||
if let url = bundle.url(forResource: "Gridicons", withExtension: "bundle"), | ||
let assetBundle = Bundle(url: url) { | ||
// When loaded through CocoaPods, assets reside in a separate resource bundle | ||
bundle = assetBundle | ||
} | ||
|
||
let image = UIImage(named: name, in: bundle, compatibleWith: nil) | ||
guard let result = image else { fatalError("Unable to load image named \(name).") } | ||
return result | ||
} | ||
} | ||
|
||
private final class BundleToken {} | ||
|
||
{% else %} | ||
// No assets found | ||
{% endif %} |
Oops, something went wrong.