SemyonSinchenko commented on issue #191:
URL: 
https://github.com/apache/arrow-datafusion-comet/issues/191#issuecomment-1992404804

   This short bash script can generate everything like in 
`common/target/classes/comet-git-info.properties`:
   ```bash
   #!/usr/bin/bash
   
   echo_build_properties() {
        echo "git.branch=$(git rev-parse --abbrev-ref HEAD)"
        echo "git.build.host=$(uname -n)"
        echo "git.build.time=$(date -u +%Y-%m-%dT%H:%M:%S%z)"
        echo "git.build.user.email=$(git config user.email)"
        echo "git.build.user.name=$(git config user.name)"
        echo "git.build.version=${1}"
        echo "git.commit.id.abbrev=$(git rev-parse --short HEAD)"
        echo "git.commit.id.full=$(git rev-parse HEAD)"
        echo "git.remote.origin.url=$(git config --get remote.origin.url |  sed 
's|https://\(.*\)@\(.*\)|https://\2|')"
   }
   
   echo_build_properties $1
   ```
   In this case VERSION should be passed into the script. It may be got from 
`mvn` but it is like a magic: `./mvnw -q -Dexec.executable=echo 
-Dexec.args='${project.version}' --non-recursive exec:exec`. I can add into the 
script, but in spark bash script that was my inspiration, version is passed.
   
   @snmvaughan Does it look OK for you? If so, I can open a PR that adds this 
bash-script into, for example `bin/` and name it `comet-build-info`. Also, I 
can add a call of that script into Makefile as something like `.PHONY 
build_props` and also add it to all targets that build JAR (like `jvm:` -> 
`jvm: build_props`, `release:` -> `release: build_props`, etc.)


-- 
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