Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 3 KB

CONTRIBUTING.md

File metadata and controls

71 lines (52 loc) · 3 KB

Contribute to Crux

Crux is a modern, robust library for parsing HTML articles. With all the content on the Web out there, there is always lots of room for improvement. We will gladly accept your pull requests that make parsing more accurate, or add new features & metadata detection.

To maintain the integrity of the library, we have a few simple expectations from all code submitted.

  1. The expected style for code formatting is available in the repo using the EditorConfig standard. We recommend using a JetBrains IDE for Kotlin, and configuring it to automatically use the .editorconfig file included in this repository.
  2. Crux is fully unit-tested, and we want to keep it that way. All new code should include unit tests.
  3. For parsing improvements, Crux’s rich suite of integration tests should be updated to reflect the parsing changes. Authors may either choose to test their improvements with existing HTML test files, or add new ones, as appropriate.
  4. All current tests should continue to pass. Either update the tests in the same commit, or modify new code so that existing tests continue to pass.
  5. Changes should be self-contained as far as possible. When implementing multiple independent improvements, each one should be in its own commit.

Publish a New Release

Create a New Release

  1. Update version in build.gradle.kts.
  2. Create a separate commit for the version number change, naming it Bump version to x.y.z.
  3. Push all pending commits to GitHub.
  4. Wait for CI to confirm green status.
  5. Tag that commit as a release at https://github.com/chimbori/crux/releases .

Publish to Maven Central

Confirm that the gradle.properties file in the home directory (~/.gradle/gradle.properties) is present and set up correctly.

./gradlew publish --no-daemon --no-parallel

Close & Release

Automatically

After archives have been successfully uploaded, publish using:

./gradlew closeAndReleaseRepository

Manually

  • Go to https://oss.sonatype.org/#stagingRepositories, login as chimbori.
  • Select the comchimboricrux-xxxx repo, then click on Close from the top toolbar.
  • Wait for the Close step to complete, then click on Release from the top toolbar.

Set Up Key Signing on a New Machine

Signing

  1. Install GPG, e.g. brew install gpg on macOS.
  2. Locate stored credentials from private storage.
  3. Run restore-keys.sh from the stored credentials directory.
  4. Enter the password for chimbori when prompted. This password is different from the Sonatype/Nexus password.

Credentials

  1. Copy gradle.properties.sample to ~/.gradle/gradle.properties and fill in the missing redacted credentials.
  2. If gradle.properties.private exists, it may be used instead. gradle.properties.private is configured to be .gitignored, so make sure it is never pushed to a public repo.
  3. The new machine is now ready and configured for pushing to Maven Central.