jekyll-theme-zer0 0.7.2 → 0.8.1
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 +72 -0
- data/README.md +33 -4
- data/_plugins/preview_image_generator.rb +258 -0
- data/_plugins/theme_version.rb +88 -0
- data/assets/images/previews/git-workflow-best-practices-for-modern-teams.png +0 -0
- data/scripts/README.md +443 -0
- data/scripts/analyze-commits.sh +313 -0
- data/scripts/build +115 -0
- data/scripts/build.sh +33 -0
- data/scripts/build.sh.legacy +174 -0
- data/scripts/example-usage.sh +102 -0
- data/scripts/fix-markdown-format.sh +265 -0
- data/scripts/gem-publish.sh +42 -0
- data/scripts/gem-publish.sh.legacy +700 -0
- data/scripts/generate-preview-images.sh +846 -0
- data/scripts/install-preview-generator.sh +531 -0
- data/scripts/lib/README.md +263 -0
- data/scripts/lib/changelog.sh +313 -0
- data/scripts/lib/common.sh +154 -0
- data/scripts/lib/gem.sh +226 -0
- data/scripts/lib/git.sh +205 -0
- data/scripts/lib/preview_generator.py +646 -0
- data/scripts/lib/test/run_tests.sh +140 -0
- data/scripts/lib/test/test_changelog.sh +87 -0
- data/scripts/lib/test/test_gem.sh +68 -0
- data/scripts/lib/test/test_git.sh +82 -0
- data/scripts/lib/test/test_validation.sh +72 -0
- data/scripts/lib/test/test_version.sh +96 -0
- data/scripts/lib/validation.sh +139 -0
- data/scripts/lib/version.sh +178 -0
- data/scripts/release +240 -0
- data/scripts/release.sh +33 -0
- data/scripts/release.sh.legacy +342 -0
- data/scripts/setup.sh +155 -0
- data/scripts/test-auto-version.sh +260 -0
- data/scripts/test-mermaid.sh +251 -0
- data/scripts/test.sh +156 -0
- data/scripts/version.sh +152 -0
- metadata +37 -1
data/scripts/version.sh
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Version management script for zer0-mistakes Jekyll theme
|
|
4
|
+
# Usage: ./scripts/version.sh [patch|minor|major] [--dry-run]
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Colors for output
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
NC='\033[0m' # No Color
|
|
13
|
+
|
|
14
|
+
# Default values
|
|
15
|
+
VERSION_TYPE="${1:-patch}"
|
|
16
|
+
DRY_RUN=false
|
|
17
|
+
|
|
18
|
+
# Parse arguments
|
|
19
|
+
while [[ $# -gt 0 ]]; do
|
|
20
|
+
case $1 in
|
|
21
|
+
--dry-run)
|
|
22
|
+
DRY_RUN=true
|
|
23
|
+
shift
|
|
24
|
+
;;
|
|
25
|
+
patch|minor|major)
|
|
26
|
+
VERSION_TYPE="$1"
|
|
27
|
+
shift
|
|
28
|
+
;;
|
|
29
|
+
*)
|
|
30
|
+
echo -e "${RED}Unknown option: $1${NC}"
|
|
31
|
+
exit 1
|
|
32
|
+
;;
|
|
33
|
+
esac
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# Function to log messages
|
|
37
|
+
log() {
|
|
38
|
+
echo -e "${GREEN}[VERSION]${NC} $1"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
warn() {
|
|
42
|
+
echo -e "${YELLOW}[WARNING]${NC} $1"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
error() {
|
|
46
|
+
echo -e "${RED}[ERROR]${NC} $1"
|
|
47
|
+
exit 1
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Check if we're in a git repository
|
|
51
|
+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
|
52
|
+
error "Not in a git repository"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Check if working directory is clean
|
|
56
|
+
if [[ -n $(git status --porcelain) ]]; then
|
|
57
|
+
error "Working directory is not clean. Please commit or stash changes first."
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# Check if version.rb exists
|
|
61
|
+
if [[ ! -f "lib/jekyll-theme-zer0/version.rb" ]]; then
|
|
62
|
+
error "lib/jekyll-theme-zer0/version.rb not found"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Check if gemspec exists
|
|
66
|
+
if [[ ! -f "jekyll-theme-zer0.gemspec" ]]; then
|
|
67
|
+
error "jekyll-theme-zer0.gemspec not found"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Get current version from Ruby version file
|
|
71
|
+
CURRENT_VERSION=$(grep -o 'VERSION = "[^"]*"' lib/jekyll-theme-zer0/version.rb | sed 's/VERSION = "\(.*\)"/\1/')
|
|
72
|
+
if [[ -z "$CURRENT_VERSION" ]]; then
|
|
73
|
+
error "Could not read version from lib/jekyll-theme-zer0/version.rb"
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
log "Current version: $CURRENT_VERSION"
|
|
77
|
+
|
|
78
|
+
# Calculate new version
|
|
79
|
+
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
|
|
80
|
+
MAJOR=${VERSION_PARTS[0]}
|
|
81
|
+
MINOR=${VERSION_PARTS[1]}
|
|
82
|
+
PATCH=${VERSION_PARTS[2]}
|
|
83
|
+
|
|
84
|
+
case $VERSION_TYPE in
|
|
85
|
+
major)
|
|
86
|
+
MAJOR=$((MAJOR + 1))
|
|
87
|
+
MINOR=0
|
|
88
|
+
PATCH=0
|
|
89
|
+
;;
|
|
90
|
+
minor)
|
|
91
|
+
MINOR=$((MINOR + 1))
|
|
92
|
+
PATCH=0
|
|
93
|
+
;;
|
|
94
|
+
patch)
|
|
95
|
+
PATCH=$((PATCH + 1))
|
|
96
|
+
;;
|
|
97
|
+
esac
|
|
98
|
+
|
|
99
|
+
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
|
100
|
+
log "New version: $NEW_VERSION"
|
|
101
|
+
|
|
102
|
+
if [[ "$DRY_RUN" == true ]]; then
|
|
103
|
+
log "Dry run mode - no changes will be made"
|
|
104
|
+
log "Would update version from $CURRENT_VERSION to $NEW_VERSION"
|
|
105
|
+
exit 0
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
# Update version.rb
|
|
109
|
+
log "Updating lib/jekyll-theme-zer0/version.rb..."
|
|
110
|
+
sed -i.bak "s/VERSION = \".*\"/VERSION = \"$NEW_VERSION\"/" lib/jekyll-theme-zer0/version.rb
|
|
111
|
+
rm lib/jekyll-theme-zer0/version.rb.bak 2>/dev/null || true
|
|
112
|
+
|
|
113
|
+
# Update package.json to keep in sync
|
|
114
|
+
if [[ -f "package.json" ]]; then
|
|
115
|
+
log "Updating package.json..."
|
|
116
|
+
jq ".version = \"$NEW_VERSION\"" package.json > package.json.tmp && mv package.json.tmp package.json
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# Validate gemspec can be built
|
|
120
|
+
log "Validating gemspec..."
|
|
121
|
+
if ! gem build jekyll-theme-zer0.gemspec > /dev/null 2>&1; then
|
|
122
|
+
error "Failed to build gemspec"
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
# Clean up test gem file
|
|
126
|
+
rm -f jekyll-theme-zer0-*.gem
|
|
127
|
+
|
|
128
|
+
# Update CHANGELOG if it exists
|
|
129
|
+
if [[ -f "CHANGELOG.md" ]]; then
|
|
130
|
+
log "Updating CHANGELOG.md..."
|
|
131
|
+
DATE=$(date +"%Y-%m-%d")
|
|
132
|
+
sed -i.bak "1s/^/## [$NEW_VERSION] - $DATE\n\n### Changed\n- Version bump to $NEW_VERSION\n\n/" CHANGELOG.md
|
|
133
|
+
rm CHANGELOG.md.bak 2>/dev/null || true
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
# Git operations
|
|
137
|
+
log "Committing changes..."
|
|
138
|
+
git add lib/jekyll-theme-zer0/version.rb
|
|
139
|
+
[[ -f "package.json" ]] && git add package.json
|
|
140
|
+
[[ -f "CHANGELOG.md" ]] && git add CHANGELOG.md
|
|
141
|
+
git commit -m "chore: bump version to $NEW_VERSION"
|
|
142
|
+
|
|
143
|
+
log "Creating git tag..."
|
|
144
|
+
git tag -a "v$NEW_VERSION" -m "Release version $NEW_VERSION"
|
|
145
|
+
|
|
146
|
+
log "Version bump complete!"
|
|
147
|
+
log "Current version: $NEW_VERSION"
|
|
148
|
+
log "Tagged as: v$NEW_VERSION"
|
|
149
|
+
log ""
|
|
150
|
+
log "Next steps:"
|
|
151
|
+
log "1. Run 'git push origin main --tags' to push changes and tags"
|
|
152
|
+
log "2. Run './scripts/build.sh' to build and publish the gem"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-theme-zer0
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amr Abdel
|
|
@@ -145,6 +145,8 @@ files:
|
|
|
145
145
|
- _layouts/sitemap-collection.html
|
|
146
146
|
- _layouts/stats.html
|
|
147
147
|
- _layouts/tag.html
|
|
148
|
+
- _plugins/preview_image_generator.rb
|
|
149
|
+
- _plugins/theme_version.rb
|
|
148
150
|
- _sass/core/_docs.scss
|
|
149
151
|
- _sass/core/_syntax.scss
|
|
150
152
|
- _sass/core/_theme.scss
|
|
@@ -159,6 +161,7 @@ files:
|
|
|
159
161
|
- assets/images/gravatar-small.png
|
|
160
162
|
- assets/images/gravatar.png
|
|
161
163
|
- assets/images/info-banner-mountain-wizard.png
|
|
164
|
+
- assets/images/previews/git-workflow-best-practices-for-modern-teams.png
|
|
162
165
|
- assets/images/wizard-on-journey.png
|
|
163
166
|
- assets/images/zer0-checkpoint-1.png
|
|
164
167
|
- assets/images/zer0-checkpoint-2.png
|
|
@@ -176,6 +179,39 @@ files:
|
|
|
176
179
|
- assets/js/particles.js
|
|
177
180
|
- assets/js/side-bar-folders.js
|
|
178
181
|
- assets/particles.json
|
|
182
|
+
- scripts/README.md
|
|
183
|
+
- scripts/analyze-commits.sh
|
|
184
|
+
- scripts/build
|
|
185
|
+
- scripts/build.sh
|
|
186
|
+
- scripts/build.sh.legacy
|
|
187
|
+
- scripts/example-usage.sh
|
|
188
|
+
- scripts/fix-markdown-format.sh
|
|
189
|
+
- scripts/gem-publish.sh
|
|
190
|
+
- scripts/gem-publish.sh.legacy
|
|
191
|
+
- scripts/generate-preview-images.sh
|
|
192
|
+
- scripts/install-preview-generator.sh
|
|
193
|
+
- scripts/lib/README.md
|
|
194
|
+
- scripts/lib/changelog.sh
|
|
195
|
+
- scripts/lib/common.sh
|
|
196
|
+
- scripts/lib/gem.sh
|
|
197
|
+
- scripts/lib/git.sh
|
|
198
|
+
- scripts/lib/preview_generator.py
|
|
199
|
+
- scripts/lib/test/run_tests.sh
|
|
200
|
+
- scripts/lib/test/test_changelog.sh
|
|
201
|
+
- scripts/lib/test/test_gem.sh
|
|
202
|
+
- scripts/lib/test/test_git.sh
|
|
203
|
+
- scripts/lib/test/test_validation.sh
|
|
204
|
+
- scripts/lib/test/test_version.sh
|
|
205
|
+
- scripts/lib/validation.sh
|
|
206
|
+
- scripts/lib/version.sh
|
|
207
|
+
- scripts/release
|
|
208
|
+
- scripts/release.sh
|
|
209
|
+
- scripts/release.sh.legacy
|
|
210
|
+
- scripts/setup.sh
|
|
211
|
+
- scripts/test-auto-version.sh
|
|
212
|
+
- scripts/test-mermaid.sh
|
|
213
|
+
- scripts/test.sh
|
|
214
|
+
- scripts/version.sh
|
|
179
215
|
homepage: https://github.com/bamr87/zer0-mistakes
|
|
180
216
|
licenses:
|
|
181
217
|
- MIT
|