From f95ed913f6d629aaafb19e2d3bafb591419bdeaf Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Wed, 29 Mar 2023 10:24:08 -0700 Subject: [PATCH] Add semver check (#156) * Add semver check Fix format Speeling Speeling * Further contributing note * Speeling * Fix hostPlatform -> stdenv issue * Bump dependencies --------- Co-authored-by: Cole Helbling --- CONTRIBUTING.md | 3 +++ flake.nix | 1 + nix/check.nix | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 549b2bd..805610a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -359,6 +359,9 @@ You can also remove your `$HOME/nix-installer-wsl-tests-temp` folder whenever yo # Releases + +This package uses [Semantic Versioning](https://semver.org/). When determining the version number for a new release refer to Semantic Versioning for guidance. You can use the `check-semver` command alias from within the development environment to validate your changes don't break semver. + To cut a release: * Ensure the `flake.lock`, `Cargo.lock`, and Rust dependencies are up-to-date with the following: diff --git a/flake.nix b/flake.nix index 6a73213..91601db 100644 --- a/flake.nix +++ b/flake.nix @@ -139,6 +139,7 @@ check.check-spelling check.check-nixpkgs-fmt check.check-editorconfig + check.check-semver ] ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ libiconv ]); }; diff --git a/nix/check.nix b/nix/check.nix index 5a45b57..31badf4 100644 --- a/nix/check.nix +++ b/nix/check.nix @@ -41,4 +41,13 @@ in eclint . ''; }); + + # Semver + check-semver = (writeShellApplication { + name = "check-semver"; + runtimeInputs = with pkgs; [ cargo-semver-checks ]; + text = '' + cargo-semver-checks semver-checks check-release + ''; + }); }