Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to mise #208

Merged
merged 9 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ on: [push]

jobs:
test:
runs-on: macos-14
env:
MINT_PATH: "~/mint_cache"
runs-on: macos-15

steps:
- uses: actions/checkout@v1

- name: Generate project and run tests
run: |
export PATH=~/.rbenv/shims:"$PATH"

brew install cookiecutter rbenv mint fastlane &&
rbenv install 3.0.6 &&
brew install cookiecutter mise fastlane &&
mise settings set experimental true &&
mise activate --shims &&
cookiecutter --no-input -f . &&
cd Project &&
mise install &&
fastlane scan
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [3.0] - TBA
### Changed
- Обновлена версия Swift до 6.0
### Removed
- Удален .git-branches.toml
- Удален Podfile
- Удален Makefile, проект мигрирован на использование mise
- Полностью удалена зависимость от SwiftGen

## [2.5.0] - 2024-10-16
### Added
- Добавлен `.git-branches.toml` файл для настройки работы проекта с [git-town](https://github.com/git-town/git-town).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Here are some of the key features of this project template:

### Prerequisites

Make sure that `cookiecutter` and `mint` tools are installed. Preferred way to make it is using homebrew.
Make sure that `cookiecutter` and `mise` tools are installed. Preferred way to make it is using homebrew.

```sh
brew install cookiecutter mint
brew install cookiecutter mise
```

### Bootstrap a new project
Expand Down
20 changes: 6 additions & 14 deletions hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
#!/bin/sh

# Generate xcodeproj file
make project
#
# Generate SwiftGen xcfilelist
make xcfilelist
# Install all dependencies
mise install

# Generate SwiftGen files
make swiftgen
# Generate xcodeproj file
mise run project

# Download .gitignore file
curl -L 'https://www.gitignore.io/api/swift,macos,fastlane' > .gitignore
echo '.cache' >> .gitignore
{% if cookiecutter.ignore_xcproject == "Yes" %}
echo '{{ cookiecutter.name }}.xcodeproj' >> .gitignore
echo '{{ cookiecutter.name }}.xcworkspace' >> .gitignore
{% endif %}

echo 'Pods' >> .gitignore

make fmt
make gems
mise run fmt

# Stamp current version of xcode in .xcode-version file
xcodebuild -version | sed 's/Xcode //' | head -n 1 > .xcode-version
Expand All @@ -29,4 +21,4 @@ git init
git add .
git commit -m "Initial commit"

make hooks
mise generate git-pre-commit --write
12 changes: 0 additions & 12 deletions {{ cookiecutter.name }}/.git-branches.toml

This file was deleted.

9 changes: 9 additions & 0 deletions {{ cookiecutter.name }}/.mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tasks]
pre-commit = "swiftformat {{ cookiecutter.name }} {{ cookiecutter.name }}Tests --lint"
fmt = "swiftformat {{ cookiecutter.name }} {{ cookiecutter.name }}Tests"
project = "xcodegen"

[tools]
xcodes = "1.5.0"
swiftformat = "0.54.6"
xcodegen = "2.38.0"
1 change: 0 additions & 1 deletion {{ cookiecutter.name }}/.ruby-version

This file was deleted.

3 changes: 0 additions & 3 deletions {{ cookiecutter.name }}/Gemfile

This file was deleted.

60 changes: 0 additions & 60 deletions {{ cookiecutter.name }}/Makefile

This file was deleted.

12 changes: 0 additions & 12 deletions {{ cookiecutter.name }}/Podfile

This file was deleted.

2 changes: 1 addition & 1 deletion {{ cookiecutter.name }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Before launching the project, it's important to confirm that each team member ha

---

This project was created using [the project template](https://github.com/alphatroya/swift-project-template) version 2.5.0.
This project was created using [the project template](https://github.com/alphatroya/swift-project-template) version 3.0.0.
3 changes: 0 additions & 3 deletions {{ cookiecutter.name }}/hooks/post-checkout

This file was deleted.

3 changes: 0 additions & 3 deletions {{ cookiecutter.name }}/hooks/pre-commit

This file was deleted.

11 changes: 1 addition & 10 deletions {{ cookiecutter.name }}/project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: {{ cookiecutter.name }}
options:
postGenCommand: "make pods"
deploymentTarget:
iOS: {{ cookiecutter.deployment_target }}
developmentLanguage: ru
Expand All @@ -19,7 +18,7 @@ settings:
VERSIONING_SYSTEM: apple-generic
CURRENT_PROJECT_VERSION: 1
MARKETING_VERSION: 1.0
SWIFT_VERSION: 5.0
SWIFT_VERSION: 6.0
DEVELOPMENT_TEAM: {{ cookiecutter.development_team_id }}
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad: "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"
Expand All @@ -40,14 +39,6 @@ targets:
scheme:
testTargets:
- {{ cookiecutter.name | lower }}Tests
prebuildScripts:
- script: |
"${PODS_ROOT}/SwiftGen/bin/swiftgen"
name: SwiftGen
inputFileLists:
- $(SRCROOT)/swiftgen-input-files.xcfilelist
outputFileLists:
- $(SRCROOT)/swiftgen-output-files.xcfilelist
attributes:
ProvisioningStyle: Automatic
DevelopmentTeam: {{ cookiecutter.development_team_id }}
Expand Down
7 changes: 0 additions & 7 deletions {{ cookiecutter.name }}/swiftgen.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit

@MainActor
private let kHideKeyboardDelegate = HideKeyboardDelegate()

private class HideKeyboardDelegate: NSObject, UIGestureRecognizerDelegate {
Expand All @@ -20,4 +21,3 @@ extension UIViewController {
view.addGestureRecognizer(tapGesture)
}
}

Empty file.