This directory contains supporting scripts for the trainz-language-server project.
Helper script for creating conventional commit messages that follow the project's commit conventions.
Usage:
./scripts/create-commit.sh <type> [scope] <description>Examples:
./scripts/create-commit.sh feat parser "add support for async functions"
./scripts/create-commit.sh fix lsp "prevent deadlock in symbol indexing"
./scripts/create-commit.sh docs "update installation instructions"Types:
feat- A new featurefix- A bug fixperf- Performance improvementdocs- Documentation changesstyle- Code style changesrefactor- Code refactoringtest- Test changesci- CI/CD changeschore- Build/dependencies/tooling
Automated commit script that validates code quality before committing. Runs build, tests, and formatting checks.
Usage:
./scripts/commit-agent.sh "Your commit message"What it does:
- Runs
cargo buildto ensure code compiles - Runs
cargo testto ensure tests pass - Runs
cargo fmt --checkto ensure code is formatted - Runs
cargo clippy -- -D warningsto check for linting issues - Only commits if all checks pass
Node.js script to update the version of a specific crate and its corresponding workspace dependency.
Usage:
node scripts/update-crate-version.js <crate_name> <new_version>What it does:
- Updates the version in
crates/<crate_name>/Cargo.toml. - Updates the version of
trainz-<crate_name>in the rootCargo.toml.
Node.js script to update the version of a specific editor extension.
Usage:
node scripts/update-extension-version.js <extension_name> <new_version>What it does:
- Updates
versioninextensions/vscode/package.json(ifvscode) - Updates
versioninextensions/trainz-idea/build.gradle.kts(iftrainz-idea)
Node.js script to update the root package and workspace versions.
Usage:
node scripts/update-root-versions.js <new_version>What it does:
- Updates
versionin the rootpackage.json. - Updates
versionin the rootCargo.tomlunder[workspace.package].
- For regular commits: Use
./scripts/create-commit.shto generate properly formatted commit messages - For commits requiring validation: Use
./scripts/commit-agent.shto ensure code quality before committing - Version updates: The
update-crate-version.jsscript is used to update crate versions,update-extension-version.jsfor extension versions, andupdate-root-versions.jsfor the root project version.
See CONTRIBUTING.md and RELEASES.md for more details on the development and release process.