mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-06-05 23:03:55 +00:00
... another attempt with goreleaser publishing.
This commit is contained in:
@@ -82,3 +82,4 @@ logs/
|
||||
# goreleaser
|
||||
dist/
|
||||
docs/dist
|
||||
.claude-plugin
|
||||
|
||||
+5
-6
@@ -14,9 +14,8 @@ before:
|
||||
- bash -c "sed 's/{{ .Version }}/{{ .Version }}/g' ui/package.json.tpl > ui/package.json"
|
||||
- bash -c "cd ui && npm ci --silent && npm run build"
|
||||
- bash -c "rm -rf internal/worker/static && mkdir -p internal/worker/static && cp -r ui/dist/* internal/worker/static/"
|
||||
# Generate plugin config files (must be before archives, using GORELEASER_CURRENT_TAG)
|
||||
- bash -c "mkdir -p .claude-plugin && VERSION=${GORELEASER_CURRENT_TAG#v} && sed \"s/{{.Version}}/$VERSION/g; s/{{ .Version }}/$VERSION/g\" plugin/.claude-plugin/plugin.json.tpl > .claude-plugin/plugin.json"
|
||||
- bash -c "VERSION=${GORELEASER_CURRENT_TAG#v} && sed \"s/{{.Version}}/$VERSION/g; s/{{ .Version }}/$VERSION/g\" plugin/.claude-plugin/marketplace.json.tpl > .claude-plugin/marketplace.json"
|
||||
# Generate plugin config files for archives (in .claude-plugin/)
|
||||
- bash scripts/generate-plugin-config.sh
|
||||
|
||||
builds:
|
||||
# Worker service
|
||||
@@ -263,10 +262,10 @@ release:
|
||||
draft: false
|
||||
prerelease: auto
|
||||
name_template: "v{{.Version}}"
|
||||
# Upload plugin config files
|
||||
# Upload plugin config files (from linux build artifacts in split mode)
|
||||
extra_files:
|
||||
- glob: .claude-plugin/plugin.json
|
||||
- glob: .claude-plugin/marketplace.json
|
||||
- glob: dist/linux/.claude-plugin/plugin.json
|
||||
- glob: dist/linux/.claude-plugin/marketplace.json
|
||||
header: |
|
||||
## Claude Mnemonic v{{.Version}}
|
||||
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
# Generate plugin configuration files with version substitution
|
||||
# Called from .goreleaser.yaml before hooks
|
||||
|
||||
set -e
|
||||
|
||||
# Get version from GoReleaser environment variable
|
||||
if [ -n "$GORELEASER_CURRENT_TAG" ]; then
|
||||
VERSION="${GORELEASER_CURRENT_TAG#v}"
|
||||
echo "Using version from GORELEASER_CURRENT_TAG: $VERSION"
|
||||
else
|
||||
# Fallback for local testing
|
||||
VERSION="0.0.0-dev"
|
||||
echo "GORELEASER_CURRENT_TAG not set, using fallback version: $VERSION"
|
||||
fi
|
||||
|
||||
# Source and destination directories
|
||||
TEMPLATE_DIR="plugin/.claude-plugin"
|
||||
OUTPUT_DIR=".claude-plugin"
|
||||
|
||||
# Create output directory
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
# Generate plugin.json
|
||||
if [ -f "$TEMPLATE_DIR/plugin.json.tpl" ]; then
|
||||
sed "s/{{ .Version }}/$VERSION/g; s/{{.Version}}/$VERSION/g" \
|
||||
"$TEMPLATE_DIR/plugin.json.tpl" > "$OUTPUT_DIR/plugin.json"
|
||||
echo "Generated $OUTPUT_DIR/plugin.json"
|
||||
else
|
||||
echo "ERROR: Template file not found: $TEMPLATE_DIR/plugin.json.tpl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate marketplace.json
|
||||
if [ -f "$TEMPLATE_DIR/marketplace.json.tpl" ]; then
|
||||
sed "s/{{ .Version }}/$VERSION/g; s/{{.Version}}/$VERSION/g" \
|
||||
"$TEMPLATE_DIR/marketplace.json.tpl" > "$OUTPUT_DIR/marketplace.json"
|
||||
echo "Generated $OUTPUT_DIR/marketplace.json"
|
||||
else
|
||||
echo "ERROR: Template file not found: $TEMPLATE_DIR/marketplace.json.tpl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Plugin config files generated successfully with version $VERSION"
|
||||
Reference in New Issue
Block a user