Skip to content

Updating cmark library

rob phillips edited this page Nov 10, 2018 · 1 revision

Process for updating the cmark library used in the Down project

$ git clone https://github.com/commonmark/cmark.git

  • Make a branch in your Down fork.

$ git checkout -b feature/update-cmark-0.28.3

cmark is an active project and there are tags for each release. There may be commits after the last release. In the cmark workspace on your Mac checkout the tag you want to import. Most likely this will be the most recent release. git will mention detached HEAD state, which is not a problem.

$ git checkout 0.28.3

You can view the tags on the cmark GitHub page or using git lol or git tag.

  • Copy the files from the cmark project /src folder into your Down fork's /cmark folder replacing the files that are there. There are a handful of files in cmark that aren't used in Down like CMakeLists.txt, cmark_version_h.in and a few others. git status will show you which files aren't used if you copy them over. Don't copy those over or delete them if they are copied over.

  • Build the Down project and run the Tests. It's possible that cmark might add or remove files and if so adjustments would need to be made to the Down project. If there are problems with the build or any unit tests, adjustments will need to be made. It might make sense to run the Tests on different OS versions, but the test suite runs on different targets (iOS, macOS, and tvOS).

  • Once the tests pass you should commit the new files to your branch, push to origin and make a Pull Request.

  • Once the Pull Request is submitted the new branch will build on travis automatically. If there are failures there they'll be reported on your Pull Request page. The travis build is controlled by a .travis.yml file in the Down project and you can make changes to that file in your Pull Request and push them.

Clone this wiki locally