First off, thank you for considering contributing to ssstar.
If your contribution is not straightforward, please first discuss the change you wish to make by creating a new issue before making the change.
Before reporting an issue on the issue tracker, please check that it has not already been reported by searching for some related keywords.
Try to do one pull request per change.
Update the changes you have made in CHANGELOG file under the Unreleased section.
Add the changes of your pull request to one of the following subsections, depending on the types of changes defined by Keep a changelog:
Addedfor new features.Changedfor changes in existing functionality.Deprecatedfor soon-to-be removed features.Removedfor now removed features.Fixedfor any bug fixes.Securityin case of vulnerabilities.
If the required subsection does not exist yet under Unreleased, create it!
This is no different than other Rust projects.
git clone https://github.com/elastio/ssstar
cd ssstar
cargo test-
Build and run release version:
cargo build --release && cargo run --release -
Run Clippy:
cargo clippy --all-targets --all-features --workspace
-
Run all tests:
cargo test --all-features --workspace -
Check to see if there are code formatting issues
cargo fmt --all -- --check
-
Format the code in the project
cargo fmt --all
This is for Elastio employees with the ability to publish to GitHub and crates.io.
We use the cargo release tool to automate most of the release activities. The important settings are always set up in
the release.toml file. To perform a release, check out master and do the following:
-
Make sure you have the latest
master. -
Make sure all tests are passing on CI
-
Update the
CHANGELOG.mdfile, changing theUnreleasedto the version number to be released, and putting a new emptyUnreleasedsection at the top -
Make sure you have the latest
cargo-release:cargo install --force cargo-release -
Run this command to prepare the release (it won't actually push or release anything):
cargo release --workspace --execute --no-publish --no-push $LEVELWhere you replace
$LEVELwithmajor,minor, orpatchdepending on which component of the crate semver you need to increment. For now, while this crate is still pre-1.0, usepatchfor non-breaking changes andminorfor breaking changes. Do not usemajorwithout agreement from all contributors and Adam. -
cargo releasewill make two commits in your local repo, one making a new release tagged withvX.Y.Zwhere X, Y, and Z are the semver components of the new release, and it will also updatemasterwith a new-devversion that is one patch level higher than the released version. -
To actually perform the release, do a
git push && git push --tagsto push all of the changes made bycargo-release -
Monitor the progress of the release activites in Github Actions. Sometimes these fail and then it's a huge PITA since you in effect need to undo the release (if the failure happened before the publish to crates.io), or yank the crates.io release and make a new patch release which hopefully fixes the problem.
Better ways to do this are welcome. In particular it would be better if we could automate more of this process.