mirror of
https://github.com/stephenkall/obsidian-confluence-vault-uploader.git
synced 2026-07-22 07:43:48 +00:00
- Delete dead src/page-browser-modal.ts (inline style violations, never imported)
- settings.ts: replace createEl('h2') with setHeading(), remove (text as any) cast
- main.ts: add typed Confluence API interfaces, make requestConfluence generic,
remove unused App import, fix catch bindings, show failureCount in final notice
- build-and-deploy.sh + update-plugin.bat: read OBSIDIAN_PLUGIN_DIR from .env
- Add .env.example so vault path is never hardcoded in tracked files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.1 KiB
Bash
38 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Setup PATH for Node.js (Git Bash on Windows)
|
|
export PATH="/c/Program Files/nodejs:$PATH"
|
|
|
|
# Load local vault path from .env (copy .env.example → .env to configure)
|
|
if [ -f .env ]; then
|
|
# shellcheck disable=SC1091
|
|
source .env
|
|
fi
|
|
|
|
if [ -z "$OBSIDIAN_PLUGIN_DIR" ]; then
|
|
echo "❌ OBSIDIAN_PLUGIN_DIR not set. Copy .env.example → .env and fill in the path."
|
|
exit 1
|
|
fi
|
|
|
|
# Get version from package.json
|
|
VERSION=$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\([^"]*\)".*/\1/')
|
|
echo "📦 Current version: $VERSION"
|
|
|
|
# Update manifest.json with current version
|
|
echo "🔄 Updating manifest.json..."
|
|
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$VERSION\"/" manifest.json
|
|
|
|
# Build
|
|
echo "🏗️ Building plugin..."
|
|
npm run build
|
|
|
|
# Deploy to Obsidian plugins folder
|
|
echo "📁 Copying to: $OBSIDIAN_PLUGIN_DIR"
|
|
mkdir -p "$OBSIDIAN_PLUGIN_DIR"
|
|
|
|
cp main.js "$OBSIDIAN_PLUGIN_DIR/"
|
|
cp main.js.map "$OBSIDIAN_PLUGIN_DIR/"
|
|
cp manifest.json "$OBSIDIAN_PLUGIN_DIR/"
|
|
|
|
echo "✅ Build complete! Version $VERSION deployed."
|
|
echo "🔄 Reload plugin in Obsidian (Settings → Community plugins → Reload or Ctrl+Shift+P → Reload)"
|