Skip to content

Latest commit

 

History

History
84 lines (51 loc) · 1.84 KB

CONTRIBUTING.md

File metadata and controls

84 lines (51 loc) · 1.84 KB

Contributing to dns_erlang

Getting started

1. Clone the repository

Clone the repository and move into it:

git clone [email protected]:dnsimple/dns_erlang.git
cd dns_erlang

2. Install Erlang

3. Install the dependencies

make

Updating Dependencies

When dependencies are updated the rebar.lock file will need to be updated for the new dependency to be used. The following command does this:

./rebar3 upgrade --all

Formatting

If your editor doesn't automatically format Erlang code using erlfmt, run:

make format

You should run this command before releasing.

3. Build and test

Compile the project and run the test suite to check everything works as expected.

Testing

make test

Releasing

The following instructions uses $VERSION as a placeholder, where $VERSION is a MAJOR.MINOR.BUGFIX release such as 1.2.0.

  1. Run the test suite and ensure all the tests pass.

  2. Set the version in src/dns_erlang.app.src

  3. Run the test suite and ensure all the tests pass.

  4. Finalize the ## main section in CHANGELOG.md assigning the version.

  5. Commit and push the changes

    git commit -a -m "Release $VERSION"
    git push origin main
  6. Wait for CI to complete.

  7. Create a signed tag.

    git tag -a v$VERSION -s -m "Release $VERSION"
    git push origin --tags
  8. GitHub actions will take it from there and release to https://hex.pm/packages/dns_erlang

Tests

Submit unit tests for your changes. You can test your changes on your machine by running the test suite.

When you submit a PR, tests will also be run on the continuous integration environment via GitHub Actions.