We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2abf97e commit 1895bc5Copy full SHA for 1895bc5
scripts/generate-options.sh
@@ -3,11 +3,14 @@
3
4
set -euo pipefail
5
6
-# Get schema URL from argument or default
7
-SCHEMA_URL="${1:-https://charm.land/crush.json}"
+# Get the version from the crush package
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+VERSION=$(grep -oP 'version = "\K[^"]+' "$SCRIPT_DIR/../pkgs/crush/default.nix" | head -1)
9
+
10
+# Build schema URL from version
11
+SCHEMA_URL="${1:-https://raw.githubusercontent.com/charmbracelet/crush/refs/tags/v${VERSION}/schema.json}"
12
13
# Call the Python script
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
TEMP_FILE=$(mktemp --suffix=.nix)
15
trap 'rm -f "$TEMP_FILE"' EXIT
16
0 commit comments