From c80b4c4e36a8f71fb2460ff50c5e14f525bd580e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 13 Jan 2016 19:07:36 +0100 Subject: Switch to thrift compiler 0.9.3 --- thrift-compile.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/thrift-compile.sh b/thrift-compile.sh index 4831fd7..4bc17ba 100755 --- a/thrift-compile.sh +++ b/thrift-compile.sh @@ -1,7 +1,7 @@ #!/bin/sh -if ! thrift --version | grep -q "0\.9\.1"; then - echo -n "Warning! You should be using Thrift 0.9.1, but you have $(thrift --version), do you still want to continue? [y/N]: " +if ! thrift --version | grep -q "0\.9\.3"; then + echo -n "Warning! You should be using Thrift 0.9.3, but you have $(thrift --version), do you still want to continue? [y/N]: " read choice if [ "x${choice:0:1}" != "xy" ]; then echo "Aborting!" @@ -18,6 +18,15 @@ if thrift --gen java src/main/thrift/bwlp.thrift; then echo "Error copying compiled files! Aborting!" exit 1 fi + # reset all files where only the @Generated line changed, so we don't pollute the git history too much + for file in src/main/java/org/openslx/bwlp/thrift/iface/*.java; do + TOTAL=$(git diff "$file" | wc -l) + GENS=$(git diff "$file" | grep -E '^[\+\-]@Gen' | wc -l) + if [ "$TOTAL" = "13" -a "$GENS" = "2" ]; then + # Nothing but @Generated annotation changed + git checkout "$file" + fi + done fi echo "All done!" -- cgit v1.2.3-55-g7522