diff --git a/.envrc b/.envrc index 5a1af45..4eaafb8 100644 --- a/.envrc +++ b/.envrc @@ -1,5 +1,2 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" -fi watch_file ./shell/default.nix flake.lock -use flake . -L --builders '' +use flake . -L diff --git a/CHANGELOG.md b/CHANGELOG.md index c890a6c..8fc9336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] - ## [1.0.0] - 2025-08-29 ### Initial Release diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 0000000..c91a1e7 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,27 @@ + +[changelog] +header = """ +# Changelog + +All notable changes to this project will be documented in this file. +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +""" +body = """ +{% if version -%} + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else -%} + ## [Unreleased] +{% endif -%} +{% for group, commits in commits | group_by(attribute="group") %} + ## {{ group | title }} + {% for commit in commits %} + - {% if commit.scope %}{{ commit.scope }}: {% endif %}{{ commit.message | split(pat="\n") | first | trim }} + ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/mlabs-haskell/cardano-nix/commit/{{ commit.id }})) - {{ commit.author.name }} ({{ commit.author.timestamp | date(format="%Y-%m-%d") }}) + {% endfor %} +{% endfor %} +""" + +[git] +tag_pattern = "v[0-9]*" +conventional_commits = true diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 120000 index 0000000..04c99a5 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1 @@ +../CHANGELOG.md \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 2d20142..76e1ba9 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -69,6 +69,7 @@ nav: - development/develop.md - development/contributing.md - license.md + - CHANGELOG.md ## Section commented out below, would be autogenerated during docs rendering # - NixOS Module Reference: # - reference/module-options/default.md diff --git a/shell/default.nix b/shell/default.nix index 1a2f43c..bada654 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -17,14 +17,15 @@ name = "cardano.nix"; motd = '' ❄️ Welcome to the {14}{bold}cardano.nix{reset} devshell ❄️ - $(type -p menu &>/dev/null && menu) - $(type -p update-pre-commit-hooks &>/dev/null && update-pre-commit-hooks) + $(menu) + $(${config.pre-commit.installationScript}) ''; }; packages = with pkgs; [ statix config.treefmt.build.wrapper reuse + git-cliff ]; commands = [ {