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

Use xcode-rakelib to project setup #99

Merged
merged 10 commits into from Jan 17, 2018
Merged

Use xcode-rakelib to project setup #99

merged 10 commits into from Jan 17, 2018

Conversation

diogot
Copy link
Collaborator

@diogot diogot commented Jan 16, 2018

Changes in this pull request

Sorry for the big PR, I didn't write this much of code.
The old rakelib is a pet project that started in MyWeight, and I ported to Swifte-evolution. Later I create a new project to make easy to be used in other projects.
This project is xcode-rakelib, and I added here as git subtree.

The main advantage of use xcode-rakelib is that the project configuration is done in rake-config.yml instead of messing directly with the rakelib files.
The current tasks supported are:

$ rake
rake -T
rake bump:build                         # Bump build number
rake bump:major                         # Bump major version
rake bump:minor                         # Bump minor version
rake bump:patch                         # Bump patch version
rake danger                             # Run danger
rake git:add_tag                        # Add tag with current version
rake git:push                           # Push current branch and tags
rake setup                              # Install/update and configure project
rake setup:brew                         # Update brew and install/update fo...
rake setup:bundler                      # Bundle install
rake setup:carthage                     # Carthage
rake setup:carthage_update[dependency]  # Install carthage dependencies
rake setup:cocoapods                    # CocoaPods
rake setup:pod_install                  # Pod install
rake setup:pod_repo_update              # Pod repo update
rake setup:submodules                   # Updated submodules
rake swiftgen                           # Run SwiftGen
rake swiftgen:strings                   # Generate strings
rake xcode:release[env]                 # Release
rake xcode:tests                        # Run unit tests

Another question is why git subtree instead of git submodules?
With subtree, all the files are committed to the project, so there is no need to run any additional command on project setup. If we need to update to a new version of xcode-rakelib is needed to run:

git remote add -f xcode-rakelib git@github.com:diogot/xcode-rakelib.git
git fetch xcode-rakelib master
git subtree pull --prefix rakelib xcode-rakelib master --squash

But most of the users don't need to bother with this.

Otherwise, If we choose to use submodules after each git clone will be necessary to run git submodule update --init --recursive to be able to run any rake task, including rake setup. I think this is not very friendly.

The next step is to configure Danger on the CI. It looks like the project is using Bitrise but I didn't find any config file.

Checklist

  • Project builds and runs as expected.
  • No new linting violations have been introduced.
  • No new bugs have been introduced.
  • I have reviewed the contributing guide

@diogot diogot added the setup label Jan 16, 2018
@diogot
Copy link
Collaborator Author

diogot commented Jan 16, 2018

If anyone is interested in reading more about git subtree, I followed this tutorial.

Copy link
Member

@unnamedd unnamedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @diogot, thank you!

@unnamedd unnamedd merged commit 432ce13 into development Jan 17, 2018
@unnamedd unnamedd deleted the xcode-rakelib branch January 17, 2018 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants