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

Add instructions for releasing a fork #3351

Closed
wants to merge 1 commit into from
Closed

Conversation

sethfri
Copy link
Contributor

@sethfri sethfri commented Sep 18, 2020

While I was working on a patch for SwiftLint, I needed to be able to run it from the root of my project
in order to reproduce the bug. It took a lot of trial and error to figure out how to get my project to pick
up my fork's binaries. It'd be great to have these instructions as part of the repo to help future
contributors.

While I was working on a patch for SwiftLint, I needed to be able to run it from the root of my project
in order to reproduce the bug. It took a lot of trial and error to figure out how to get my project to pick
up my fork's binaries. It'd be great to have these instructions as part of the repo to help future
contributors.
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2020

Codecov Report

Merging #3351 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3351   +/-   ##
=======================================
  Coverage   90.50%   90.51%           
=======================================
  Files         417      417           
  Lines       20432    20432           
=======================================
+ Hits        18493    18494    +1     
+ Misses       1939     1938    -1     
Impacted Files Coverage Δ
...tFramework/Rules/Lint/ValidIBInspectableRule.swift 100.00% <0.00%> (+1.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d2e8cf...3f8d8ab. Read the comment docs.

@jpsim
Copy link
Collaborator

jpsim commented Sep 22, 2020

There are much simpler ways to test changes in SwiftLint without cutting releases.

Using Xcode

  1. git clone https://github.com/realm/SwiftLint.git
  2. cd SwiftLint
  3. xed .
  4. Select the "swiftlint" scheme
  5. cmd-opt-r open the scheme options
  6. Set the "Arguments Passed On Launch" you want in the "Arguments" tab
  7. Set the "Working Directory" you want in the "Options" tab
  8. Hit "Run"
Arguments Options
image image

Then you can use the full power of Xcode/LLDB/Instruments to develop and debug your changes to SwiftLint.

Using the command line

  1. git clone https://github.com/realm/SwiftLint.git
  2. cd SwiftLint
  3. swift build [-c release]
  4. Use the produced swiftlint binary from the command line, either by running swift run [-c release] [swiftlint] [arguments] or by invoking the binary directly at .build/[release|debug]/swiftlint
  5. [Optional] Attach LLDB: lldb -- .build/[release|debug]/swiftlint [arguments]

I'll make a PR adding this information to CONTRIBUTING.md to make it easier for contributors to learn about these development practices.

Update: PR here: #3360

@sethfri
Copy link
Contributor Author

sethfri commented Sep 25, 2020

@jpsim Amazing! Thank you. I didn't know the Working Directory option existed, so that's the part I was struggling with. This makes things so much easier 🙏🏻

@sethfri sethfri closed this Sep 25, 2020
@sethfri sethfri deleted the patch-2 branch September 25, 2020 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants