Skip to content

Commit

Permalink
Merge pull request #19 from ra1028/chore/drop-support-for-cocoapods
Browse files Browse the repository at this point in the history
chore: Drop support for CocoaPods
  • Loading branch information
ra1028 committed May 25, 2022
2 parents c936ea4 + 06f9b15 commit a696b74
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 178 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/publish.yml
@@ -1,7 +1,8 @@
name: Publish
name: publish
on:
release:
types: [published]

jobs:
publish:
name: Publish
Expand All @@ -15,21 +16,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Ruby Gem Cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gem-
- name: Install Ruby Gem
if: steps.cache.outputs.cache-hit != 'true'
run: make gem-install
- name: Upload Zip
run: make upload-zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_RELEASE_ID: ${{ github.event.release.id }}
- name: CocoaPods Trunk Push
run: make pod-trunk-push
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
14 changes: 2 additions & 12 deletions .github/workflows/test.yml
@@ -1,9 +1,10 @@
name: GitHub Actions
name: test
on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
linux:
Expand Down Expand Up @@ -36,16 +37,5 @@ jobs:
run: |
swift --version
xcodebuild -version
- name: Get Ruby Gem Cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gem-
- name: Install Ruby Gem
if: steps.cache.outputs.cache-hit != 'true'
run: make gem-install
- name: Run Test
run: make test
- name: CocoaPods Lib Lint
run: make pod-lib-lint
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -2,8 +2,6 @@
.build
/*.xcodeproj
xcuserdata/
vendor/
.bundle/
.tmp
.swiftpm/
swift-mod.zip
1 change: 0 additions & 1 deletion .version

This file was deleted.

3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

97 changes: 0 additions & 97 deletions Gemfile.lock

This file was deleted.

11 changes: 0 additions & 11 deletions Makefile
Expand Up @@ -37,24 +37,13 @@ lint:

autocorrect: mod format lint

pod-lib-lint:
bundle exec pod lib lint

pod-trunk-push:
bundle exec pod trunk push --skip-tests --skip-import-validation swift-mod.podspec

ubuntu-deps:
apt-get update --assume-yes
apt-get install --assume-yes libsqlite3-dev libncurses-dev

docker-test:
docker run -v `pwd`:`pwd` -w `pwd` --rm $(DOCKER_IMAGE_NAME) make ubuntu-deps test

gem-install:
bundle config path vendor/bundle
bundle config unset frozen
bundle install --jobs 4 --retry 3

zip: build
install_name_tool -add_rpath @loader_path -add_rpath $(XCODE_DEFAULT_TOOLCHAIN)/usr/lib/swift/macosx $(TOOL_BIN) 2>/dev/null || true
rm -f $(TOOL_NAME).zip
Expand Down
32 changes: 8 additions & 24 deletions README.md
Expand Up @@ -2,12 +2,10 @@

A tool for Swift code modification intermediating between code generation and formatting.

[![Swift5](https://img.shields.io/badge/language-Swift5-orange.svg)](https://developer.apple.com/swift)
[![Release](https://img.shields.io/github/release/ra1028/swift-mod.svg)](https://github.com/ra1028/swift-mod/releases/latest)
[![Swift Package Manager](https://img.shields.io/badge/SwiftPM-compatible-blue.svg)](https://swift.org/package-manager)
[![CocoaPods](https://img.shields.io/cocoapods/v/swift-mod.svg)](https://cocoapods.org/pods/swift-mod)
[![CI Status](https://github.com/ra1028/swift-mod/workflows/GitHub%20Actions/badge.svg)](https://github.com/ra1028/swift-mod/actions)
[![Lincense](http://img.shields.io/badge/License-Apache%202.0-black.svg)](https://github.com/ra1028/swift-mod/blob/master/LICENSE)
[![swift](https://img.shields.io/badge/language-Swift5-orange.svg)](https://developer.apple.com/swift)
[![release](https://img.shields.io/github/release/ra1028/swift-mod.svg)](https://github.com/ra1028/swift-mod/releases/latest)
[![test](https://github.com/ra1028/swift-mod/workflows/GitHub%20Actions/badge.svg)](https://github.com/ra1028/swift-mod/actions)
[![lincense](http://img.shields.io/badge/License-Apache%202.0-black.svg)](https://github.com/ra1028/swift-mod/blob/master/LICENSE)

---

Expand Down Expand Up @@ -267,9 +265,7 @@ struct Avenger {

## Installation

`swift-mod` doesn't support [HomeBrew](http://brew.sh/) because it's hard to keep backward compatibility due to depended on the version of Swift toolchain you are using.

### Using [Swift Package Manager](https://github.com/apple/swift-package-manager)
### [Swift Package Manager](https://github.com/apple/swift-package-manager)

Add the following to the dependencies of your `Package.swift`:

Expand All @@ -285,7 +281,7 @@ Run command:
swift run -c release swift-mod [COMMAND] [OPTIONS]
```

### Using [Mint](https://github.com/yonaskolb/Mint)
### [Mint](https://github.com/yonaskolb/Mint)

Install with Mint by following command:

Expand All @@ -299,21 +295,9 @@ Run command:
mint run ra1028/swift-mod [COMMAND] [OPTIONS]
```

### Using [CocoaPods](https://github.com/CocoaPods/CocoaPods)

Add the following to your `Podfile`:

```sh
pod 'swift-mod'
```

Run command:

```sh
Pods/swift-mod/swift-mod [COMMAND] [OPTIONS]
```
### Using a pre-built binary

\* If you have changed the name of `Xcode.app` used in toolchain (`xcode-select -p`), `swift-mod` via CocoaPods can't be excuted. Please set the Xcode name to `Xcode.app`. (See: <https://forums.swift.org/t/swiftsyntax-with-swift-5-1/29051>)
You can also install swift-mod by downloading `swift-mod.zip` from the latest GitHub release.

### Swift Version Support

Expand Down
3 changes: 1 addition & 2 deletions Tools/Package.swift
Expand Up @@ -6,6 +6,5 @@ let package = Package(
name: "Tools",
dependencies: [
.package(url: "https://github.com/apple/swift-format.git", .upToNextMinor(from: "0.50600.0")),
],
targets: [.target(name: "Tools", path: "TargetStub")]
]
)
Empty file removed Tools/TargetStub/Stub.swift
Empty file.
12 changes: 0 additions & 12 deletions swift-mod.podspec

This file was deleted.

0 comments on commit a696b74

Please sign in to comment.