mirror of
https://github.com/mii443/merkle.rs.git
synced 2025-08-22 16:05:30 +00:00
pin protoc version
This commit is contained in:
committed by
Romain Ruetschi
parent
c0b013b2bf
commit
473ea4001c
@ -75,4 +75,5 @@ script:
|
||||
|
||||
before_install:
|
||||
- export PATH=$PATH:$HOME/protobuf/bin
|
||||
- export PROTOC_VERSION=$(cat PROTOC_VERSION)
|
||||
- bash install_protobuf.sh
|
||||
|
1
PROTOC_VERSION
Normal file
1
PROTOC_VERSION
Normal file
@ -0,0 +1 @@
|
||||
libprotoc 3.5.1
|
5
build.rs
5
build.rs
@ -15,7 +15,8 @@ fn assert_protobuf_version(version: &str) {
|
||||
assert!(version_output.status.success());
|
||||
assert_eq!(
|
||||
String::from_utf8(version_output.stdout).unwrap().trim(),
|
||||
version
|
||||
version.to_string().trim(),
|
||||
"protoc version must be 3.5.1"
|
||||
);
|
||||
}
|
||||
|
||||
@ -32,7 +33,7 @@ fn build_protobuf(out_dir: &str, input: &[&str], includes: &[&str]) {
|
||||
|
||||
#[cfg(feature = "serialization-protobuf")]
|
||||
fn build_protobuf_schemata() {
|
||||
assert_protobuf_version("libprotoc 3.5.1");
|
||||
assert_protobuf_version(env!("PROTOC_VERSION"));
|
||||
build_protobuf("src/proto", &["protobuf/proof.proto"], &[]);
|
||||
}
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
set -e
|
||||
|
||||
check_protoc_version () {
|
||||
version="libprotoc $1"
|
||||
PROTOC="$HOME/protobuf/bin/protoc"
|
||||
PROTOC_VERSION=$(cat PROTOC_VERSION)
|
||||
PROTOC="protoc"
|
||||
if [ -f $PROTOC ]; then
|
||||
this_version=`$PROTOC --version`
|
||||
return `[ "$version" = "$this_version" ]`
|
||||
return `[ "$PROTOC_VERSION" = "$this_version" ]`
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user