jekyll-theme-zer0 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/README.md +56 -24
- data/_data/README.md +419 -17
- data/_data/generate_statistics.rb +216 -9
- data/_data/generate_statistics.sh +106 -0
- data/_data/github-actions-example.yml +210 -0
- data/_data/navigation/quickstart.yml +11 -3
- data/_data/posts_organization.yml +153 -0
- data/_data/prerequisites.yml +112 -0
- data/_data/statistics_config.yml +203 -0
- data/_data/ui-text.yml +321 -0
- data/_data/update_statistics.sh +126 -0
- data/_includes/content/intro.html +4 -4
- data/_layouts/notebook.html +3 -3
- data/scripts/README.md +3 -0
- data/scripts/lib/changelog.sh +89 -57
- data/scripts/test/lib/run_tests.sh +1 -2
- metadata +9 -2
data/scripts/lib/changelog.sh
CHANGED
|
@@ -2,14 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog generation library for zer0-mistakes release scripts
|
|
4
4
|
# Provides automatic changelog generation from git commit history
|
|
5
|
-
|
|
6
|
-
# Check Bash version (need 4+ for associative arrays)
|
|
7
|
-
if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
|
|
8
|
-
echo "[ERROR] This script requires Bash 4.0 or higher (current: ${BASH_VERSION})" >&2
|
|
9
|
-
echo "[INFO] On macOS, install via: brew install bash" >&2
|
|
10
|
-
echo "[INFO] Then update scripts to use: #!/usr/local/bin/bash" >&2
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
5
|
+
# Compatible with Bash 3.2+ (macOS default) and Bash 4+
|
|
13
6
|
|
|
14
7
|
# Source common utilities
|
|
15
8
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
@@ -119,18 +112,19 @@ generate_changelog() {
|
|
|
119
112
|
return 0
|
|
120
113
|
fi
|
|
121
114
|
|
|
122
|
-
# Parse and categorize commits
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
115
|
+
# Parse and categorize commits using parallel indexed arrays (Bash 3.2 compatible)
|
|
116
|
+
# Category names in order
|
|
117
|
+
local category_names=("breaking" "added" "changed" "deprecated" "removed" "fixed" "security" "other")
|
|
118
|
+
|
|
119
|
+
# Initialize category content arrays
|
|
120
|
+
local cat_breaking=""
|
|
121
|
+
local cat_added=""
|
|
122
|
+
local cat_changed=""
|
|
123
|
+
local cat_deprecated=""
|
|
124
|
+
local cat_removed=""
|
|
125
|
+
local cat_fixed=""
|
|
126
|
+
local cat_security=""
|
|
127
|
+
local cat_other=""
|
|
134
128
|
|
|
135
129
|
local commit_count=0
|
|
136
130
|
while IFS='|' read -r hash subject author date; do
|
|
@@ -176,10 +170,41 @@ generate_changelog() {
|
|
|
176
170
|
local clean_msg
|
|
177
171
|
clean_msg=$(clean_commit_message "$subject")
|
|
178
172
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
173
|
+
# Append to appropriate category variable
|
|
174
|
+
case "$category" in
|
|
175
|
+
"breaking")
|
|
176
|
+
[[ -n "$cat_breaking" ]] && cat_breaking+=$'\n'
|
|
177
|
+
cat_breaking+="- $clean_msg"
|
|
178
|
+
;;
|
|
179
|
+
"added")
|
|
180
|
+
[[ -n "$cat_added" ]] && cat_added+=$'\n'
|
|
181
|
+
cat_added+="- $clean_msg"
|
|
182
|
+
;;
|
|
183
|
+
"changed")
|
|
184
|
+
[[ -n "$cat_changed" ]] && cat_changed+=$'\n'
|
|
185
|
+
cat_changed+="- $clean_msg"
|
|
186
|
+
;;
|
|
187
|
+
"deprecated")
|
|
188
|
+
[[ -n "$cat_deprecated" ]] && cat_deprecated+=$'\n'
|
|
189
|
+
cat_deprecated+="- $clean_msg"
|
|
190
|
+
;;
|
|
191
|
+
"removed")
|
|
192
|
+
[[ -n "$cat_removed" ]] && cat_removed+=$'\n'
|
|
193
|
+
cat_removed+="- $clean_msg"
|
|
194
|
+
;;
|
|
195
|
+
"fixed")
|
|
196
|
+
[[ -n "$cat_fixed" ]] && cat_fixed+=$'\n'
|
|
197
|
+
cat_fixed+="- $clean_msg"
|
|
198
|
+
;;
|
|
199
|
+
"security")
|
|
200
|
+
[[ -n "$cat_security" ]] && cat_security+=$'\n'
|
|
201
|
+
cat_security+="- $clean_msg"
|
|
202
|
+
;;
|
|
203
|
+
"other")
|
|
204
|
+
[[ -n "$cat_other" ]] && cat_other+=$'\n'
|
|
205
|
+
cat_other+="- $clean_msg"
|
|
206
|
+
;;
|
|
207
|
+
esac
|
|
183
208
|
|
|
184
209
|
done <<< "$commits_raw"
|
|
185
210
|
|
|
@@ -192,39 +217,46 @@ generate_changelog() {
|
|
|
192
217
|
|
|
193
218
|
changelog_entry+="## [$new_version] - $date"$'\n\n'
|
|
194
219
|
|
|
195
|
-
# Add sections in order
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
220
|
+
# Add sections in order (using individual variables instead of associative array)
|
|
221
|
+
if [[ -n "$cat_breaking" ]]; then
|
|
222
|
+
changelog_entry+="### ⚠️ BREAKING CHANGES"$'\n'
|
|
223
|
+
changelog_entry+="$cat_breaking"$'\n\n'
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
if [[ -n "$cat_added" ]]; then
|
|
227
|
+
changelog_entry+="### Added"$'\n'
|
|
228
|
+
changelog_entry+="$cat_added"$'\n\n'
|
|
229
|
+
fi
|
|
230
|
+
|
|
231
|
+
if [[ -n "$cat_changed" ]]; then
|
|
232
|
+
changelog_entry+="### Changed"$'\n'
|
|
233
|
+
changelog_entry+="$cat_changed"$'\n\n'
|
|
234
|
+
fi
|
|
235
|
+
|
|
236
|
+
if [[ -n "$cat_deprecated" ]]; then
|
|
237
|
+
changelog_entry+="### Deprecated"$'\n'
|
|
238
|
+
changelog_entry+="$cat_deprecated"$'\n\n'
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
if [[ -n "$cat_removed" ]]; then
|
|
242
|
+
changelog_entry+="### Removed"$'\n'
|
|
243
|
+
changelog_entry+="$cat_removed"$'\n\n'
|
|
244
|
+
fi
|
|
245
|
+
|
|
246
|
+
if [[ -n "$cat_fixed" ]]; then
|
|
247
|
+
changelog_entry+="### Fixed"$'\n'
|
|
248
|
+
changelog_entry+="$cat_fixed"$'\n\n'
|
|
249
|
+
fi
|
|
250
|
+
|
|
251
|
+
if [[ -n "$cat_security" ]]; then
|
|
252
|
+
changelog_entry+="### Security"$'\n'
|
|
253
|
+
changelog_entry+="$cat_security"$'\n\n'
|
|
254
|
+
fi
|
|
255
|
+
|
|
256
|
+
if [[ -n "$cat_other" ]]; then
|
|
257
|
+
changelog_entry+="### Other"$'\n'
|
|
258
|
+
changelog_entry+="$cat_other"$'\n\n'
|
|
259
|
+
fi
|
|
228
260
|
|
|
229
261
|
# Preview changelog
|
|
230
262
|
info "Changelog preview:"
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
# Test runner for library unit tests
|
|
4
4
|
# Usage: ./scripts/test/lib/run_tests.sh
|
|
5
5
|
#
|
|
6
|
-
#
|
|
7
|
-
# On macOS: brew install bash
|
|
6
|
+
# Compatible with Bash 3.2+ (macOS default) and Bash 4+
|
|
8
7
|
|
|
9
8
|
# Note: We intentionally don't use set -e here because test assertions
|
|
10
9
|
# may return non-zero and we want to continue running tests
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-theme-zer0
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.15.
|
|
4
|
+
version: 0.15.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amr Abdel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -81,12 +81,19 @@ files:
|
|
|
81
81
|
- _data/authors.yml
|
|
82
82
|
- _data/content_statistics.yml
|
|
83
83
|
- _data/generate_statistics.rb
|
|
84
|
+
- _data/generate_statistics.sh
|
|
85
|
+
- _data/github-actions-example.yml
|
|
84
86
|
- _data/navigation/about.yml
|
|
85
87
|
- _data/navigation/docs.yml
|
|
86
88
|
- _data/navigation/home.yml
|
|
87
89
|
- _data/navigation/main.yml
|
|
88
90
|
- _data/navigation/posts.yml
|
|
89
91
|
- _data/navigation/quickstart.yml
|
|
92
|
+
- _data/posts_organization.yml
|
|
93
|
+
- _data/prerequisites.yml
|
|
94
|
+
- _data/statistics_config.yml
|
|
95
|
+
- _data/ui-text.yml
|
|
96
|
+
- _data/update_statistics.sh
|
|
90
97
|
- _includes/README.md
|
|
91
98
|
- _includes/analytics/google-analytics.html
|
|
92
99
|
- _includes/analytics/google-tag-manager-body.html
|