summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-13 19:07:36 +0100
committerSimon Rettberg2016-01-13 19:07:36 +0100
commitc80b4c4e36a8f71fb2460ff50c5e14f525bd580e (patch)
tree771da83105be096292241e17252ed96420ad0235
parent[thrift] Fix whitespace (diff)
downloadmaster-sync-shared-c80b4c4e36a8f71fb2460ff50c5e14f525bd580e.tar.gz
master-sync-shared-c80b4c4e36a8f71fb2460ff50c5e14f525bd580e.tar.xz
master-sync-shared-c80b4c4e36a8f71fb2460ff50c5e14f525bd580e.zip
Switch to thrift compiler 0.9.3
-rwxr-xr-xthrift-compile.sh13
1 files 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!"