build(release): add release packaging script and notes for v4.5.0

swadhin biswas committed 1 years ago
703e841
1 parent 18c10c4
commit 703e841
3 files changed
+142 -0
▼CHANGELOG.md
+28-0
1
+# Changelog
2
+
3
+All notable changes to this project will be documented in this file.
4
+
5
+## [4.5.0] - 2025-10-16
6
+### Added
7
+- Horizontal layout (-x) with row-major grid formatting
8
+- Extension sorting (-X) with icon preservation
9
+- Tab-size control (-T, --tabsize=COLS) passed to formatter
10
+- Security context display (-Z, --context)
11
+- NUL-terminated output (--zero)
12
+- C-style escape handling (-b, --escape)
13
+- Python column formatter (column.py) with LSF_LAYOUT and LSF_TABSIZE
14
+- Installer (install.sh) with --user/--system modes and verification
15
+- Configuration alias script (config/lsf_alias_setup.sh)
16
+- Docs: INSTALLATION, CONFIGURATION, COMPATIBILITY, TROUBLESHOOTING, QUICK_REFERENCE
17
+- One-page site (index.html) and example screenshot
18
+
19
+### Changed
20
+- Refactor complex view to preserve icons with -Z and -l
21
+- Add decode_c_escapes() and print_output_line() utilities
22
+- Improved parse_args for combined short options (e.g., -lx, -bZ)
23
+- LICENSE year updated to 2025
24
+
25
+### Removed
26
+- Deprecated ls-material.sh script
27
+
28
+[4.5.0]: https://github.com/swadhin-biswas/ls-f/releases/tag/v4.5.0
0
29
▼RELEASE_NOTES.md
+30-0
1
+# Release Notes — v4.5.0
2
+
3
+This release turns ls-f into a production-ready, icon-enhanced wrapper around GNU ls with strong compatibility and a polished install path.
4
+
5
+## Highlights
6
+- Native support: -x, -X, -T/--tabsize, -Z/--context, --zero, -b/--escape
7
+- Smarter formatting powered by column.py (row/column layouts, tabsize)
8
+- Installer with user/system modes and post-install verification
9
+- Comprehensive docs and website with demo screenshot
10
+
11
+## What's New
12
+- Horizontal by-lines layout (-x)
13
+- Sort by extension (-X)
14
+- Security context display (-Z/--context)
15
+- NUL-terminated output (--zero)
16
+- C-style escapes for reliable icon lookup (-b/--escape)
17
+- Environment-driven formatter (LSF_LAYOUT, LSF_TABSIZE)
18
+
19
+## Installation
20
+- Recommended: git clone and run ./install.sh --user
21
+- Or download both lsf and column.py to your bin directory
22
+
23
+## Compatibility
24
+Most GNU ls flags pass through unchanged. See README for the compatibility roadmap with statuses.
25
+
26
+## Checksums
27
+SHA256 sums are provided alongside release archives for verification.
28
+
29
+## Thanks
30
+Thanks to contributors and users for testing and feedback.
0
31
▼tools/release.sh
+84-0
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+# Release packaging script for ls-f
5
+# - Creates versioned tar.gz and zip archives under dist/
6
+# - Includes lsf, column.py, install.sh, LICENSE, README.md, docs/
7
+# - Generates SHA256 checksums and a manifest
8
+
9
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+cd "$ROOT_DIR"
11
+
12
+VERSION="${1:-}"
13
+if [[ -z "$VERSION" ]]; then
14
+ # Try to read from lsf script
15
+ if [[ -f lsf ]]; then
16
+ VERSION=$(grep -E '^VERSION="[^"]+"' lsf | sed -E 's/.*VERSION="([^"]+)".*/\1/')
17
+ fi
18
+fi
19
+
20
+if [[ -z "$VERSION" ]]; then
21
+ echo "Usage: $0 <version>" >&2
22
+ echo "Or ensure VERSION is set in ./lsf" >&2
23
+ exit 1
24
+fi
25
+
26
+DIST_DIR="$ROOT_DIR/dist"
27
+mkdir -p "$DIST_DIR"
28
+
29
+NAME="ls-f-$VERSION"
30
+STAGE="$DIST_DIR/$NAME"
31
+rm -rf "$STAGE"
32
+mkdir -p "$STAGE"
33
+
34
+# Files to include
35
+INCLUDE=(
36
+ "lsf"
37
+ "column.py"
38
+ "install.sh"
39
+ "LICENSE"
40
+ "README.md"
41
+ "INSTALL.md"
42
+ "QUICK_REFERENCE.md"
43
+ "docs"
44
+ "config"
45
+)
46
+
47
+# Copy files
48
+for item in "${INCLUDE[@]}"; do
49
+ if [[ -e "$item" ]]; then
50
+ cp -a "$item" "$STAGE/"
51
+ else
52
+ echo "WARN: missing $item" >&2
53
+ fi
54
+done
55
+
56
+# Generate MANIFEST
57
+{
58
+ echo "name: $NAME"
59
+ echo "version: $VERSION"
60
+ echo "date: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
61
+ echo "files:"
62
+ (cd "$STAGE" && find . -type f | sed 's#^\./##' | sort)
63
+} > "$STAGE/MANIFEST.txt"
64
+
65
+# Create archives
66
+( cd "$DIST_DIR" && tar -czf "$NAME.tar.gz" "$NAME" )
67
+( cd "$DIST_DIR" && zip -rq "$NAME.zip" "$NAME" )
68
+
69
+# Checksums
70
+( cd "$DIST_DIR" && sha256sum "$NAME.tar.gz" "$NAME.zip" > "$NAME.SHA256SUMS" )
71
+
72
+# Summary
73
+cat <<EOF
74
+Release artifacts created in $DIST_DIR:
75
+- $NAME.tar.gz
76
+- $NAME.zip
77
+- $NAME.SHA256SUMS
78
+- $NAME/MANIFEST.txt
79
+
80
+Next steps:
81
+- Create a GitHub Release tagged v$VERSION
82
+- Upload the archives and checksums
83
+- Paste release notes from RELEASE_NOTES.md
84
+EOF
0
85