From 131392c59b81b3ebe69ffd609eea100d717c4f7f Mon Sep 17 00:00:00 2001 From: ra1028 Date: Wed, 25 May 2022 20:54:01 +0900 Subject: [PATCH] Drop support for CocoaPods --- .github/workflows/publish.yml | 16 +----- .github/workflows/test.yml | 14 +---- .gitignore | 2 - .version | 1 - Gemfile | 3 -- Gemfile.lock | 97 ----------------------------------- Makefile | 11 ---- README.md | 33 +++--------- Tools/Package.swift | 3 +- Tools/TargetStub/Stub.swift | 0 swift-mod.podspec | 12 ----- 11 files changed, 13 insertions(+), 179 deletions(-) delete mode 100644 .version delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 Tools/TargetStub/Stub.swift delete mode 100644 swift-mod.podspec diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fa4e575..b23e686 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,8 @@ -name: Publish +name: publish on: release: types: [published] + jobs: publish: name: Publish @@ -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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd00b73..3235804 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,10 @@ -name: GitHub Actions +name: test on: pull_request: push: branches: - master + workflow_dispatch: jobs: linux: @@ -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 diff --git a/.gitignore b/.gitignore index c5863c4..342ac2a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,5 @@ .build /*.xcodeproj xcuserdata/ -vendor/ -.bundle/ .tmp swift-mod.zip diff --git a/.version b/.version deleted file mode 100644 index 7c1886b..0000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -0.0.10 diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 4e9ba52..0000000 --- a/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gem 'cocoapods', '1.11.3' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index bd0d283..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,97 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.5) - rexml - activesupport (6.1.5) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - atomos (0.1.3) - claide (1.1.0) - cocoapods (1.11.3) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.11.3) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 1.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.11.3) - activesupport (>= 5.0, < 7) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.5.1) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored2 (3.1.2) - concurrent-ruby (1.1.10) - escape (0.0.4) - ethon (0.15.0) - ffi (>= 1.15.0) - ffi (1.15.5) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.10.0) - concurrent-ruby (~> 1.0) - json (2.6.1) - minitest (5.15.0) - molinillo (0.8.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - public_suffix (4.0.6) - rexml (3.2.5) - ruby-macho (2.5.1) - typhoeus (1.4.0) - ethon (>= 0.9.0) - tzinfo (2.0.4) - concurrent-ruby (~> 1.0) - xcodeproj (1.21.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - zeitwerk (2.5.4) - -PLATFORMS - ruby - -DEPENDENCIES - cocoapods (= 1.11.3) - -BUNDLED WITH - 2.1.4 diff --git a/Makefile b/Makefile index 8d92b20..c0ee324 100644 --- a/Makefile +++ b/Makefile @@ -39,12 +39,6 @@ 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 @@ -52,11 +46,6 @@ ubuntu-deps: 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 diff --git a/README.md b/README.md index 5376d87..6ce8f3a 100644 --- a/README.md +++ b/README.md @@ -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) --- @@ -279,9 +277,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`: @@ -297,7 +293,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: @@ -311,22 +307,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] -``` - -\* 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) +### Using a pre-built binary +You can also install swift-mod by downloading `swift-mod.zip` from the latest GitHub release. ### Swift Version Support diff --git a/Tools/Package.swift b/Tools/Package.swift index 83c4a38..c636868 100644 --- a/Tools/Package.swift +++ b/Tools/Package.swift @@ -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")] + ] ) diff --git a/Tools/TargetStub/Stub.swift b/Tools/TargetStub/Stub.swift deleted file mode 100644 index e69de29..0000000 diff --git a/swift-mod.podspec b/swift-mod.podspec deleted file mode 100644 index b1f9ba9..0000000 --- a/swift-mod.podspec +++ /dev/null @@ -1,12 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'swift-mod' - spec.version = `cat .version` - spec.author = { 'ra1028' => 'r.fe51028.r@gmail.com' } - spec.homepage = 'https://github.com/ra1028/swift-mod' - spec.summary = 'A tool for Swift code modification intermediating between code generation and formatting.' - spec.source = { :git => 'https://github.com/ra1028/swift-mod.git', :tag => spec.version.to_s } - spec.license = { :type => 'Apache 2.0', :file => 'LICENSE' } - spec.source = { http: "#{spec.homepage}/releases/download/#{spec.version}/swift-mod.zip" } - spec.preserve_paths = '*' - spec.exclude_files = '**/file.zip' -end