Skip to content

Commit

Permalink
Run runtime crate version audit as part of pre-commit (#3450)
Browse files Browse the repository at this point in the history
This PR makes the runtime-versioner run via pre-commit so that devs will
know if they need to version bump a runtime crate sooner than CI would
otherwise tell them.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Feb 28, 2024
1 parent 4604aa5 commit 557e4b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ repos:
language: system
files: ^.*$
pass_filenames: false
# Check that runtime crates are properly version bumped when changed
- id: runtime-versioner-check
name: runtime-versioner
entry: ./.pre-commit-hooks/runtime-versioner.sh
language: system
# Only run if the rust runtime files change
files: ^.*/?rust-runtime/.*$
pass_filenames: false
# Show the info messages from the runtime versioner that explain how things will publish
verbose: true
8 changes: 8 additions & 0 deletions .pre-commit-hooks/runtime-versioner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#

set -e
cd "$(git rev-parse --show-toplevel)/tools/ci-build/runtime-versioner" && cargo run -- audit

0 comments on commit 557e4b3

Please sign in to comment.