diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index cb9be4f..b396bb6 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -5,18 +5,17 @@ on: [push] jobs: test: runs-on: macos-14 - env: - MINT_PATH: "~/mint_cache" steps: - uses: actions/checkout@v1 - name: Generate project and run tests run: | - export PATH=~/.rbenv/shims:"$PATH" + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - brew install cookiecutter rbenv mint fastlane && - rbenv install 3.0.6 && + brew install cookiecutter mise fastlane && + mise settings set experimental true && cookiecutter --no-input -f . && cd Project && - fastlane scan + mise install && + fastlane scan --scheme project --project ./Project.xcodeproj diff --git a/hooks/post_gen_project.sh b/hooks/post_gen_project.sh index 3480ede..739bd41 100755 --- a/hooks/post_gen_project.sh +++ b/hooks/post_gen_project.sh @@ -1,20 +1,15 @@ #!/bin/sh # Generate xcodeproj file -make project +mise exec -- xcodegen # 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 @@ -23,4 +18,4 @@ git init git add . git commit -m "Initial commit" -mise generate pre-commit +mise generate git-pre-commit --write diff --git a/{{ cookiecutter.name }}/.mise.toml b/{{ cookiecutter.name }}/.mise.toml index efd139c..96e008d 100644 --- a/{{ cookiecutter.name }}/.mise.toml +++ b/{{ cookiecutter.name }}/.mise.toml @@ -1,7 +1,8 @@ [tasks] -lint = "swiftformat GrowFood --lint" -fmt = "swiftformat GrowFood" +pre-commit = "swiftformat {{ cookiecutter.name }} {{ cookiecutter.name }}Tests --lint" +fmt = "swiftformat {{ cookiecutter.name }} {{ cookiecutter.name }}Tests" [tools] xcodes = "1.5.0" -"spm:nicklockwood/SwiftFormat" = "0.54.6" +swiftformat = "0.54.6" +xcodegen = "latest" diff --git a/{{ cookiecutter.name }}/.ruby-version b/{{ cookiecutter.name }}/.ruby-version deleted file mode 100644 index 818bd47..0000000 --- a/{{ cookiecutter.name }}/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.0.6 diff --git a/{{ cookiecutter.name }}/Gemfile b/{{ cookiecutter.name }}/Gemfile deleted file mode 100644 index d45950f..0000000 --- a/{{ cookiecutter.name }}/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gem 'cocoapods', '~> 1.15.0' diff --git a/{{ cookiecutter.name }}/project.yml b/{{ cookiecutter.name }}/project.yml index cd637df..28f4b06 100644 --- a/{{ cookiecutter.name }}/project.yml +++ b/{{ cookiecutter.name }}/project.yml @@ -1,6 +1,5 @@ name: {{ cookiecutter.name }} options: - postGenCommand: "make pods" deploymentTarget: iOS: {{ cookiecutter.deployment_target }} developmentLanguage: ru