-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15169/#review29467
-----------------------------------------------------------



src/Makefile.am
<https://reviews.apache.org/r/15169/#comment56696>

    The shell expression passed to -c could be simplified. Instead of:
    
    SHA=`git log -n 1 --format=%H 2> /dev/null`
    if [ $? -eq 0 ]
    then echo -DBUILD_GIT_SHA="$SHA"
    fi
    
    One can use:
    
    SHA=`git log -n 1 --format=%H 2> /dev/null` && echo -DBUILD_GIT_SHA="$SHA"


- Jason Dusek


On Nov. 27, 2013, 12:36 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15169/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2013, 12:36 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Exposing build revisions and branch names can help diagnosing problems with 
> slaves and masters in development settings.
> 
> This patch fetches git sha and branch of repo (if available) and fills option 
> variables BUILD_GIT_SHA and BUILD_GIT_BRANCH accordingly.
> If variables are set, master and slave state.json expose and sets fields 
> "git_sha" and "git_branch".
> 
> 
> Diffs
> -----
> 
>   configure.ac ba4ec1d 
>   src/Makefile.am abef3d2 
>   src/common/build.hpp c0e2a64 
>   src/common/build.cpp 960b017 
>   src/master/http.cpp 218906a 
>   src/slave/http.cpp fbc917b 
> 
> Diff: https://reviews.apache.org/r/15169/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> Functional testing of:
> 1) Development version (from git repo) -> Shows correct git hash and branch
> 2) Distribution version (from make dist) -> Does *not* show git hash and 
> branch fields in state.json
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>

Reply via email to