forked from GitHubMirrors/silverbullet-icalendar
Chore: Add version consistency check to build process
This commit is contained in:
19
check_versions.sh
Executable file
19
check_versions.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Extract versions
|
||||
TS_VERSION=$(grep "const VERSION =" icalendar.ts | cut -d'"' -f2)
|
||||
YAML_VERSION=$(grep "version:" icalendar.plug.yaml | head -n 1 | awk '{print $2}')
|
||||
PLUG_MD_VERSION=$(grep "version:" PLUG.md | head -n 1 | awk '{print $2}')
|
||||
|
||||
echo "Checking versions..."
|
||||
echo "icalendar.ts: $TS_VERSION"
|
||||
echo "icalendar.plug.yaml: $YAML_VERSION"
|
||||
echo "PLUG.md: $PLUG_MD_VERSION"
|
||||
|
||||
if [ "$TS_VERSION" == "$YAML_VERSION" ] && [ "$YAML_VERSION" == "$PLUG_MD_VERSION" ]; then
|
||||
echo "✅ All versions match."
|
||||
exit 0
|
||||
else
|
||||
echo "❌ Version mismatch detected!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user