From 00d2653d732d5f0999ff2180265e8c184ea17438 Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Mon, 17 Apr 2023 16:30:01 +0200 Subject: [PATCH] move test around, fix release scripts --- nnef/Cargo.toml | 1 - nnef/{ => nnef-resources}/tests/nnef_with_json/graph.nnef | 0 .../tests/nnef_with_json/src_config.json | 0 nnef/{ => nnef-resources}/tests/test_json_resource.rs | 0 post-release.sh | 3 ++- release.sh | 7 ++++--- 6 files changed, 6 insertions(+), 5 deletions(-) rename nnef/{ => nnef-resources}/tests/nnef_with_json/graph.nnef (100%) rename nnef/{ => nnef-resources}/tests/nnef_with_json/src_config.json (100%) rename nnef/{ => nnef-resources}/tests/test_json_resource.rs (100%) diff --git a/nnef/Cargo.toml b/nnef/Cargo.toml index 65ac3119ea..674df1a327 100644 --- a/nnef/Cargo.toml +++ b/nnef/Cargo.toml @@ -26,7 +26,6 @@ tract-core = { version = "=0.19.9-pre", path = "../core" } [dev-dependencies] temp-dir = "0.1.11" serde_json.workspace = true -tract-nnef-resources = { version = "=0.19.9-pre", path = "./nnef-resources" } [features] default = ["flate2"] diff --git a/nnef/tests/nnef_with_json/graph.nnef b/nnef/nnef-resources/tests/nnef_with_json/graph.nnef similarity index 100% rename from nnef/tests/nnef_with_json/graph.nnef rename to nnef/nnef-resources/tests/nnef_with_json/graph.nnef diff --git a/nnef/tests/nnef_with_json/src_config.json b/nnef/nnef-resources/tests/nnef_with_json/src_config.json similarity index 100% rename from nnef/tests/nnef_with_json/src_config.json rename to nnef/nnef-resources/tests/nnef_with_json/src_config.json diff --git a/nnef/tests/test_json_resource.rs b/nnef/nnef-resources/tests/test_json_resource.rs similarity index 100% rename from nnef/tests/test_json_resource.rs rename to nnef/nnef-resources/tests/test_json_resource.rs diff --git a/post-release.sh b/post-release.sh index ead93df1f1..087fd62bc3 100755 --- a/post-release.sh +++ b/post-release.sh @@ -1,7 +1,7 @@ #!/bin/sh VERSION=$1 -CRATES="data linalg core nnef pulse-opl pulse hir tensorflow onnx-opl onnx kaldi libcli cli ffi" +CRATES="data linalg core nnef nnef/nnef-resources pulse-opl pulse hir tensorflow onnx-opl onnx kaldi libcli cli ffi" if [ `uname` = "Darwin" ] then @@ -22,6 +22,7 @@ do tomato set package.version $VERSION $f > /dev/null for dep in $CRATES do + dep=$(basename $dep) if tomato get dependencies.tract-$dep.version $f | grep -F . > /dev/null then tomato set dependencies.tract-$dep.version "=$VERSION" $f > /dev/null diff --git a/release.sh b/release.sh index a50de57fea..81b393a844 100755 --- a/release.sh +++ b/release.sh @@ -4,7 +4,7 @@ cargo install tomato-toml CRATE=$1 VERSION=$2 -CRATES="data linalg core nnef pulse-opl pulse hir tensorflow onnx-opl onnx kaldi libcli ffi cli" +CRATES="data linalg core nnef nnef/nnef-resources pulse-opl pulse hir tensorflow onnx-opl onnx kaldi libcli ffi cli" if [ -z "$VERSION" ] then @@ -29,9 +29,10 @@ tomato set package.version $VERSION $CRATE/Cargo.toml for manifest in `find * -mindepth 1 -a -name Cargo.toml` do - if tomato get dependencies.tract-$CRATE.version $manifest | grep -F . + crate=$(basename $CRATE) + if tomato get dependencies.tract-$crate.version $manifest | grep -F . then - tomato set "dependencies.tract-$CRATE.version" "=$VERSION" $manifest + tomato set "dependencies.tract-$crate.version" "=$VERSION" $manifest fi done