From df234e24074745a7ca420f4b3f8c082623fa9c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 15 Sep 2025 15:54:42 +0200 Subject: [PATCH] add changelog, update libs, tag release --- .gitignore | 4 -- CHANGELOG.md | 5 ++ Cargo.lock | 100 +++++++++++----------------- Cargo.toml | 9 +-- changelog/channels/default.json | 8 +++ changelog/entries/.gitkeep | 0 changelog/entries/stable release.md | 1 + changelog/manifest.json | 3 + clpack.toml | 78 ++++++++++++++++++++++ 9 files changed, 137 insertions(+), 71 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 changelog/channels/default.json create mode 100644 changelog/entries/.gitkeep create mode 100644 changelog/entries/stable release.md create mode 100644 changelog/manifest.json create mode 100644 clpack.toml diff --git a/.gitignore b/.gitignore index 627fd0a..c403c34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ /target .idea/ - -# Remove when the lib is stable enough and useful to keep our own changelog... -changelog -clpack.toml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f40ba28 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## [1.0.0] - 2025-09-15 +- First stable release, file format version 1 + diff --git a/Cargo.lock b/Cargo.lock index 3aea402..09da715 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,12 +100,6 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "cc" version = "1.2.37" @@ -164,7 +158,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clpack" -version = "0.1.0" +version = "1.0.0" dependencies = [ "anyhow", "chrono", @@ -177,7 +171,6 @@ dependencies = [ "serde", "serde_json", "smart-default", - "thiserror", "toml", ] @@ -204,15 +197,15 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crossterm" -version = "0.25.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.4", "crossterm_winapi", - "libc", "mio", "parking_lot", + "rustix 0.38.44", "signal-hook", "signal-hook-mio", "winapi", @@ -281,15 +274,6 @@ dependencies = [ "thread_local", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "getrandom" version = "0.3.3" @@ -345,17 +329,14 @@ dependencies = [ [[package]] name = "inquire" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" +checksum = "95b8b5b4fd6d0ef1235f11c2e8ce9734be5736c21230ff585c3bae2e940abced" dependencies = [ "bitflags 2.9.4", "crossterm", "dyn-clone", "fuzzy-matcher", - "fxhash", - "newline-converter", - "once_cell", "tempfile", "unicode-segmentation", "unicode-width", @@ -389,6 +370,12 @@ version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -419,23 +406,14 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "mio" -version = "0.8.11" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "log", "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "newline-converter" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" -dependencies = [ - "unicode-segmentation", + "windows-sys 0.59.0", ] [[package]] @@ -544,6 +522,19 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + [[package]] name = "rustix" version = "1.0.8" @@ -553,7 +544,7 @@ dependencies = [ "bitflags 2.9.4", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.9.4", "windows-sys 0.60.2", ] @@ -695,30 +686,10 @@ dependencies = [ "fastrand", "getrandom", "once_cell", - "rustix", + "rustix 1.0.8", "windows-sys 0.60.2", ] -[[package]] -name = "thiserror" -version = "2.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "thread_local" version = "1.1.9" @@ -970,6 +941,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.60.2" diff --git a/Cargo.toml b/Cargo.toml index 081d5bb..c157b14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,12 @@ [package] name = "clpack" -version = "0.1.0" +version = "1.0.0" edition = "2024" authors = ["Ondřej Hruška "] description = "Manage changelog across multiple release channels" [dependencies] clap = { version = "4.5", features = ["string"] } -thiserror = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" toml = "0.9" @@ -18,8 +17,4 @@ colored = "3" faccess = "0.2" chrono = "0.4" indexmap = { version = "2.11", features = ["serde"] } - -# input - -# sadly this looks mostly abandoned. Alternative is "dialoguer" -inquire = { version = "0.7.5", features = ["editor"] } +inquire = { version = "0.8.0", features = ["editor"] } diff --git a/changelog/channels/default.json b/changelog/channels/default.json new file mode 100644 index 0000000..9bf1c8c --- /dev/null +++ b/changelog/channels/default.json @@ -0,0 +1,8 @@ +[ + { + "version": "1.0.0", + "entries": [ + "stable release" + ] + } +] \ No newline at end of file diff --git a/changelog/entries/.gitkeep b/changelog/entries/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/changelog/entries/stable release.md b/changelog/entries/stable release.md new file mode 100644 index 0000000..5be9ee3 --- /dev/null +++ b/changelog/entries/stable release.md @@ -0,0 +1 @@ +- First stable release, file format version 1 diff --git a/changelog/manifest.json b/changelog/manifest.json new file mode 100644 index 0000000..c1d3d82 --- /dev/null +++ b/changelog/manifest.json @@ -0,0 +1,3 @@ +{ + "format_version": 1 +} \ No newline at end of file diff --git a/clpack.toml b/clpack.toml new file mode 100644 index 0000000..78faa89 --- /dev/null +++ b/clpack.toml @@ -0,0 +1,78 @@ +# Configuration for clpack - changelog keeping utility +# https://github.com/MightyPork/clpack +# +# To add a changelog entry manually, place it in a .md file in changelog/entries/ + +# Folder for data files - clpack will manage contents of this folder. +data_folder = "changelog" + +# ID of the default channel - this only matters inside this config file +default_channel = "default" + +# Path or file name of the default changelog file, relative to the root of the project. +# +# The name is used as-is. +changelog_file_default = "CHANGELOG.md" + +# Path or file of a channel-specific changelog file, relative to the root of the project. +# +# Placeholders supported are: +# - `{channel}`, `{Channel}`, `{CHANNEL}` - Channel ID in the respective capitalization +changelog_file_channel = "CHANGELOG-{CHANNEL}.md" + +# Title of the changelog file, stripped and put back in front when packing changelog entries +changelog_header = ''' +# Changelog + +''' + +# Pattern for release header +release_header = "[{VERSION}] - {DATE}" + +# Date format (strftime-based) +# +# For supported patterns, see https://docs.rs/chrono/latest/chrono/format/strftime/index.html +date_format = "%Y-%m-%d" + +# Changelog sections suggested when creating a new entry. +# +# Users may also specify custom section names when writing the changelog file. +# +# Changelog entries under each section will be grouped in the packed changelog. +sections = [ + "Fixes", + "Improvements", + "New features", + "Internal", +] + +# Regex pattern to extract issue number from a branch name. +# There should be one capture group that is the number. +# +# If empty, no branch identification will be attempted. +# +# The default pattern matches 1234-gitlab-style and SW-1234-youtrack-style +branch_issue_pattern = '/^((?:SW-)?\d+)-.*/' + +# Regex pattern to extract release number from a branch name. +# There should be exactly one capture group that is the version. +# +# If empty, no branch identification will be attempted. +# +# The default pattern matches e.g. rel/1.2 +branch_version_pattern = '/^rel\/([\d.]+)$/' + +# Changelog channels & how to identify them from git branch names. +# To add a new release channel, just add it here. +# At least one channel must be defined - see the config option `default_channel` +# +# Format: key=value +# +# - key - changelog ID; this will be used in the channel file name. Examples: default, eap, beta +# - value - git branch name to recognize the channel. This is a regex pattern. +# +# For simple branch names, e.g. `main`, `master`, `test`, write the name simply as string. +# +# To specify a regex pattern (wildcard name), enclose it in slashes, e.g. '/^release\//' +[channels] +default = '/^(?:main|master)$/'