mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
- Corrected error causing free models listed under openrouter to show pricing information - Updated pre-push and pre-commit scripts to work in Windows environments when pushing to branch (windows requires npm/npx to include the ".cmd" extension to recognize and compile.
25 lines
811 B
Text
25 lines
811 B
Text
branch="$(git rev-parse --abbrev-ref HEAD)"
|
|
|
|
if [ "$branch" = "main" ]; then
|
|
echo "You can't push directly to main - please check out a branch."
|
|
exit 1
|
|
fi
|
|
|
|
# Detect if running on Windows and use npm.cmd, otherwise use npm
|
|
if [ "$OS" = "Windows_NT" ]; then
|
|
npm_cmd="npm.cmd"
|
|
else
|
|
npm_cmd="npm"
|
|
fi
|
|
|
|
"$npm_cmd" run compile
|
|
|
|
# Check for new changesets.
|
|
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
|
|
echo "Changeset files: $NEW_CHANGESETS"
|
|
|
|
if [ "$NEW_CHANGESETS" == "0" ]; then
|
|
echo "-------------------------------------------------------------------------------------"
|
|
echo "Changes detected. Please run 'npm run changeset' to create a changeset if applicable."
|
|
echo "-------------------------------------------------------------------------------------"
|
|
fi
|