jekyll-theme-zer0 0.21.0 → 0.21.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 +20 -0
- data/scripts/lib/common.sh +55 -0
- data/scripts/lib/gem.sh +7 -0
- data/scripts/lib/validation.sh +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7be7cd1499d69e545391f406a6e1513450da6b32f33584fcafc54af445bd49d
|
|
4
|
+
data.tar.gz: 53028dfe191e909adf5afba86a5ed51f382eb5e455daa440b015564de8a8090b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7083e5fc1b13c31ee8989abd710166eb3c006dd5187383660f876a69be7ff696f9eb7a28565869bb793e4214f7b3fe9e4c04b54d173cf9f987399d6f78e9ec2a
|
|
7
|
+
data.tar.gz: 84617ee1e7b5510596744ff7111df43ea2d23bcbe5fc0b413873354072e18e17ac8a77fe286fbd4c16705edf2f73bf8414331e8216ac1e5613175e0cb2fb240f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.21.2] - 2026-03-21
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Version bump: patch release
|
|
7
|
+
- Release tooling: RubyGems publishing now supports API-key auth via `.env` (`RUBY_API_KEY` mapped to `GEM_HOST_API_KEY`)
|
|
8
|
+
|
|
9
|
+
### Commits in this release
|
|
10
|
+
- 34bed37 chore(deps): update Ruby gem dependencies (#31)
|
|
11
|
+
- 50ebdd4 chore(deps): update Ruby gem dependencies (#32)
|
|
12
|
+
|
|
13
|
+
## [0.21.1] - 2026-03-13
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Version bump: patch release
|
|
17
|
+
|
|
18
|
+
### Commits in this release
|
|
19
|
+
- 9665afd feat(templates): add README.md for templates directory and usage instructions
|
|
20
|
+
- cc81bd9 chore(deps): update Ruby gem dependencies (#24)
|
|
21
|
+
|
|
22
|
+
|
|
3
23
|
## [0.21.0] - 2026-02-01
|
|
4
24
|
|
|
5
25
|
### Added
|
data/scripts/lib/common.sh
CHANGED
|
@@ -108,6 +108,60 @@ require_file() {
|
|
|
108
108
|
debug "Found required file: $file"
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
# Load simple KEY=VALUE pairs from an env file
|
|
112
|
+
load_env_file() {
|
|
113
|
+
local env_file="$1"
|
|
114
|
+
|
|
115
|
+
if [[ ! -f "$env_file" ]]; then
|
|
116
|
+
return 0
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
debug "Loading environment from $env_file"
|
|
120
|
+
|
|
121
|
+
while IFS= read -r line || [[ -n "$line" ]]; do
|
|
122
|
+
# Trim leading whitespace for easier parsing.
|
|
123
|
+
line="${line#"${line%%[![:space:]]*}"}"
|
|
124
|
+
|
|
125
|
+
[[ -z "$line" ]] && continue
|
|
126
|
+
[[ "$line" == \#* ]] && continue
|
|
127
|
+
[[ "$line" != *=* ]] && continue
|
|
128
|
+
|
|
129
|
+
local key="${line%%=*}"
|
|
130
|
+
local value="${line#*=}"
|
|
131
|
+
|
|
132
|
+
# Trim whitespace around key/value.
|
|
133
|
+
key="${key#"${key%%[![:space:]]*}"}"
|
|
134
|
+
key="${key%"${key##*[![:space:]]}"}"
|
|
135
|
+
value="${value#"${value%%[![:space:]]*}"}"
|
|
136
|
+
value="${value%"${value##*[![:space:]]}"}"
|
|
137
|
+
|
|
138
|
+
# Only export valid shell identifiers.
|
|
139
|
+
[[ "$key" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]] || continue
|
|
140
|
+
|
|
141
|
+
# Remove surrounding single/double quotes if present.
|
|
142
|
+
if [[ "$value" =~ ^\".*\"$ ]]; then
|
|
143
|
+
value="${value:1:${#value}-2}"
|
|
144
|
+
elif [[ "$value" =~ ^\'.*\'$ ]]; then
|
|
145
|
+
value="${value:1:${#value}-2}"
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
export "$key=$value"
|
|
149
|
+
done < "$env_file"
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
# Prefer API-key auth from environment for RubyGems publish operations.
|
|
153
|
+
prepare_rubygems_api_key() {
|
|
154
|
+
local repo_root
|
|
155
|
+
repo_root="$(get_repo_root)"
|
|
156
|
+
|
|
157
|
+
load_env_file "$repo_root/.env"
|
|
158
|
+
|
|
159
|
+
if [[ -z "${GEM_HOST_API_KEY:-}" ]] && [[ -n "${RUBY_API_KEY:-}" ]]; then
|
|
160
|
+
export GEM_HOST_API_KEY="$RUBY_API_KEY"
|
|
161
|
+
debug "Mapped RUBY_API_KEY to GEM_HOST_API_KEY for RubyGems publishing"
|
|
162
|
+
fi
|
|
163
|
+
}
|
|
164
|
+
|
|
111
165
|
# Get script directory
|
|
112
166
|
get_script_dir() {
|
|
113
167
|
local script_path="${BASH_SOURCE[0]}"
|
|
@@ -150,5 +204,6 @@ print_summary() {
|
|
|
150
204
|
export -f log info step success warn error debug
|
|
151
205
|
export -f confirm dry_run_exec
|
|
152
206
|
export -f command_exists require_command require_file
|
|
207
|
+
export -f load_env_file prepare_rubygems_api_key
|
|
153
208
|
export -f get_script_dir get_repo_root
|
|
154
209
|
export -f print_header print_summary
|
data/scripts/lib/gem.sh
CHANGED
|
@@ -101,6 +101,13 @@ publish_gem() {
|
|
|
101
101
|
if [[ ! -f "$gem_file" ]]; then
|
|
102
102
|
error "Gem file not found: $gem_file (run build first)"
|
|
103
103
|
fi
|
|
104
|
+
|
|
105
|
+
# Load API-key auth from environment or .env before publish.
|
|
106
|
+
prepare_rubygems_api_key
|
|
107
|
+
|
|
108
|
+
if [[ -z "${GEM_HOST_API_KEY:-}" ]] && [[ ! -f ~/.gem/credentials ]]; then
|
|
109
|
+
error "RubyGems authentication missing. Set GEM_HOST_API_KEY (or RUBY_API_KEY in .env) or run 'gem signin'."
|
|
110
|
+
fi
|
|
104
111
|
|
|
105
112
|
# Check if version already exists
|
|
106
113
|
if gem_version_exists "$version"; then
|
data/scripts/lib/validation.sh
CHANGED
|
@@ -69,9 +69,17 @@ validate_rubygems_auth() {
|
|
|
69
69
|
fi
|
|
70
70
|
|
|
71
71
|
debug "Validating RubyGems authentication..."
|
|
72
|
+
|
|
73
|
+
# Load API key from environment or .env when available.
|
|
74
|
+
prepare_rubygems_api_key
|
|
75
|
+
|
|
76
|
+
if [[ -n "${GEM_HOST_API_KEY:-}" ]]; then
|
|
77
|
+
debug "✓ RubyGems API key available via GEM_HOST_API_KEY"
|
|
78
|
+
return 0
|
|
79
|
+
fi
|
|
72
80
|
|
|
73
81
|
if [[ ! -f ~/.gem/credentials ]]; then
|
|
74
|
-
error "
|
|
82
|
+
error "RubyGems authentication missing. Set GEM_HOST_API_KEY (or RUBY_API_KEY in .env) or run 'gem signin'."
|
|
75
83
|
fi
|
|
76
84
|
|
|
77
85
|
debug "✓ RubyGems authentication present"
|
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.21.
|
|
4
|
+
version: 0.21.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: 2026-
|
|
11
|
+
date: 2026-03-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|