mirror of
https://github.com/kepano/obsidian-skills.git
synced 2026-12-05 10:05:18 -08:00
caf3e98cd2
Gemini CLI only reads skills from a root skills/ folder, and a symlink there breaks because it copies the clone with fs.cp, which points the link at a temp folder it then deletes. The manifest lives in plugins/obsidian/ instead, and a workflow attaches an archive with real copies of the skills to each published release, where Gemini installs from.
41 lines
1.0 KiB
Bash
Executable File
41 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
echo "Usage: $0 <major|minor|patch|x.y.z>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
files=(
|
|
"plugins/obsidian/plugin.json"
|
|
"plugins/obsidian/.claude-plugin/plugin.json"
|
|
"plugins/obsidian/.cursor-plugin/plugin.json"
|
|
"plugins/obsidian/gemini-extension.json"
|
|
".claude-plugin/marketplace.json"
|
|
)
|
|
|
|
current_version="$(sed -nE 's/^[[:space:]]*"version": "([0-9]+\.[0-9]+\.[0-9]+)".*/\1/p' "${files[0]}" | head -n 1)"
|
|
IFS=. read -r major minor patch <<< "$current_version"
|
|
|
|
case "$1" in
|
|
major) new_version="$((major + 1)).0.0" ;;
|
|
minor) new_version="$major.$((minor + 1)).0" ;;
|
|
patch) new_version="$major.$minor.$((patch + 1))" ;;
|
|
*)
|
|
if [[ "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
new_version="$1"
|
|
else
|
|
echo "Usage: $0 <major|minor|patch|x.y.z>" >&2
|
|
exit 1
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
for file in "${files[@]}"; do
|
|
perl -0pi -e "s/\"version\": \"[0-9]+\\.[0-9]+\\.[0-9]+\"/\"version\": \"$new_version\"/" "$file"
|
|
done
|
|
|
|
echo "Updated version: $current_version -> $new_version"
|