Skip to content

Commit

Permalink
fix: Release cocoapods (#82)
Browse files Browse the repository at this point in the history
* fix: Release cocoapods

* add changelog

* update readme
  • Loading branch information
cbaker6 committed Mar 16, 2023
1 parent 6e81c2f commit 4eb872d
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:
- name: CocoaPods
run: pod lib lint --allow-warnings
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

carthage:
timeout-minutes: 25
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ env:
CI_XCODE_LATEST: '/Applications/Xcode_14.2.app/Contents/Developer'

jobs:
# cocoapods:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: Get release version
# run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
# - name: Use multiple cores
# run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
# - name: Update Framework Version
# run: ./Scripts/update_build
# env:
# BUILD_VERSION: ${{ env.TAG }}
# - name: Deploy CocoaPods
# run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push ParseSwift.podspec --allow-warnings --verbose
# env:
# COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
# DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
cocoapods:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Get release version
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Use multiple cores
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
- name: Update Framework Version
run: ./Scripts/update_build
env:
BUILD_VERSION: ${{ env.TAG }}
- name: Deploy CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push ParseSwiftOG.podspec --allow-warnings --verbose
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

docs:
runs-on: macos-latest
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
# Parse-Swift Changelog

### main
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.3.0...main), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/main/documentation/parseswift)
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.3.1...main), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/main/documentation/parseswift)
* _Contributing to this repo? Add info about your change here to be included in the next release_

### 5.3.1
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.3.0...5.3.1), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/5.3.1/documentation/parseswift)

__Fixes__
* Release as ParseSwiftOG on cocoapods ([#82](https://github.com/netreconlab/Parse-Swift/pull/82)), thanks to [Corey Baker](https://github.com/cbaker6).

### 5.3.0
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.2.0...5.3.0), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/5.3.0/documentation/parseswift)

Expand Down
4 changes: 2 additions & 2 deletions ParseSwift.podspec → ParseSwiftOG.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ParseSwift"
s.version = "1.0.0"
s.name = "ParseSwiftOG"
s.version = "5.3.0"
s.summary = "The original Parse Swift SDK"
s.homepage = "https://github.com/netreconlab/Parse-Swift"
s.authors = {
Expand Down
4 changes: 2 additions & 2 deletions ParseSwift.podtemplate → ParseSwiftOG.podtemplate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Pod::Spec.new do |s|
s.name = "ParseSwift"
s.name = "ParseSwiftOG"
s.version = "[[VERSION]]"
s.summary = "The original Parse Swift SDK"
s.homepage = "https://github.com/netreconlab/Parse-Swift"
Expand All @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.15"
s.tvos.deployment_target = "13.0"
s.watchos.deployment_target = "6.0"
s.swift_versions = ['5.3', '5.4', '5.5', '5.6']
s.swift_versions = ['5.5', '5.6', '5.7']
s.source_files = "Sources/ParseSwift/**/*.swift"
s.license = {
:type => "Apache 2.0",
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[![Build Status Release](https://github.com/netreconlab/Parse-Swift/workflows/release/badge.svg)](https://github.com/netreconlab/Parse-Swift/actions?query=workflow%3Arelease)
[![Coverage](https://codecov.io/gh/netreconlab/Parse-Swift/branch/main/graph/badge.svg)](https://codecov.io/gh/netreconlab/Parse-Swift/branches)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/403b74d0f2514e288b0a1b2e52b6d841)](https://www.codacy.com/gh/netreconlab/Parse-Swift/dashboard?utm_source=github.com&utm_medium=referral&utm_content=netreconlab/Parse-Swift&utm_campaign=Badge_Grade)
[![Pod](https://img.shields.io/cocoapods/v/ParseSwiftOG.svg)](https://cocoapods.org/pods/ParseSwiftOG)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)][license-link]
![Xcode 13.3+](https://img.shields.io/badge/xcode-13.3%2B-blue.svg)
[![Swift Versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fnetreconlab%2FParse-Swift%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/netreconlab/Parse-Swift)
Expand Down Expand Up @@ -85,7 +86,19 @@ search field.
Add the following line to your Podfile:

```ruby
pod 'ParseSwift', :git => 'https://github.com/netreconlab/Parse-Swift.git', :branch => 'main'
pod 'ParseSwiftOG'
```

To link to the latest updates on the main branch, add the following line to your Podfile:

```ruby
pod 'ParseSwiftOG', :git => 'https://github.com/netreconlab/Parse-Swift.git', :branch => 'main'
```

In your projects, use:

```swift
import ParseSwiftOG
```

### [Carthage](https://github.com/carthage/carthage)
Expand Down
4 changes: 2 additions & 2 deletions Scripts/update_build
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Prepare podspec update
TEMPLATE_FILE_NAME="ParseSwift.podtemplate"
OUT_FILE_NAME="ParseSwift.podspec"
TEMPLATE_FILE_NAME="ParseSwiftOG.podtemplate"
OUT_FILE_NAME="ParseSwiftOG.podspec"

# Load the template podspec and replace version
TEMPLATE=$(cat "$TEMPLATE_FILE_NAME" | sed "s/\[\[VERSION\]\]/${BUILD_VERSION}/g")
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Extensions/URLSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ internal extension URLSession {
var task: URLSessionTask?
if let data = data {
do {
task = try ParseSwift
task = try Parse
.configuration
.parseFileTransfer
.upload(with: request,
Expand All @@ -309,7 +309,7 @@ internal extension URLSession {
}
} else if let file = file {
do {
task = try ParseSwift
task = try Parse
.configuration
.parseFileTransfer
.upload(with: request,
Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseSwift/ParseConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation

enum ParseConstants {
static let sdk = "swift"
static let version = "5.3.0"
static let version = "5.3.1"
static let fileManagementDirectory = "parse/"
static let fileManagementPrivateDocumentsDirectory = "Private Documents/"
static let fileManagementLibraryDirectory = "Library/"
Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseSwift/Types/ParseFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ extension ParseFile {
}

func checkDownloadsForFile(options: API.Options) throws -> ParseFile? {
var cachePolicy: URLRequest.CachePolicy = ParseSwift.configuration.requestCachePolicy
var cachePolicy: URLRequest.CachePolicy = Parse.configuration.requestCachePolicy
var shouldBreak = false
for option in options {
switch option {
Expand Down
2 changes: 1 addition & 1 deletion Tests/ParseSwiftTests/InitializeSDKTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InitializeSDKTests: XCTestCase {
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseSwift.ParseACL?
var ACL: ParseACL?
}

struct Installation: ParseInstallation {
Expand Down

0 comments on commit 4eb872d

Please sign in to comment.