ctubbsii commented on PR #3362:
URL: https://github.com/apache/accumulo/pull/3362#issuecomment-1527334613

   I'm only committing this to main, because I don't expect any thrift changes 
in earlier branches. But it works the same across all branches... just need to 
upload a different version of thrift for the different branches. This is 
actually a variation on what I use locally to resolve the different built 
versions of Thrift for the different maintenance branches.
   
   If anybody is curious, that script is:
   
   ```bash
   #! /usr/bin/bash
   
   thriftroot=$HOME/apps/thrift
   set -e
   thriftdefault="0.16.0"
   rootDir=$(git rev-parse --show-toplevel 2>/dev/null ) || ver=$thriftdefault
   ver=$({ xmllint --shell "$rootDir/pom.xml" <<<'xpath 
/*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="thrift.version"]/text()'
 | grep content= | cut -f2 -d=; } 2>/dev/null || echo "$thriftdefault")
   ver=${ver%%-*}
   
   thrift=$thriftroot/thrift-$ver/compiler/cpp/thrift
   [[ ! -x $thrift ]] && 
thrift=$thriftroot/thrift-$thriftdefault/compiler/cpp/thrift
   
   $thrift "$@"
   ```
   
   I just put this in my local PATH (in `~/bin/thrift`) and I extract copies of 
thrift releases into `~/apps/thrift` in separate directories. And I build them 
there, until they fail (they usually fail), but by then the thrift code 
generator is compiled... and that's all you really need.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to