PA_GIT_REVISION: new scripts to replace SVN revision
update_gitrevision.sh should be run before building on Mac or Linux.
This commit is contained in:
parent
d0d5020ddf
commit
a553478d71
8 changed files with 36 additions and 35 deletions
17
update_gitrevision.sh
Executable file
17
update_gitrevision.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Write the Git commit SHA to an include file.
|
||||
# This should be run before compiling code on Linux or Macintosh.
|
||||
#
|
||||
revision_filename=src/common/pa_gitrevision.h
|
||||
|
||||
# Run git first to make sure it is installed before corrupting the
|
||||
# include file.
|
||||
git rev-parse HEAD
|
||||
|
||||
# Update the include file with the current Git revision.
|
||||
echo -n "#define PA_GIT_REVISION " > ${revision_filename}
|
||||
git rev-parse HEAD >> ${revision_filename}
|
||||
|
||||
echo ${revision_filename} now contains
|
||||
cat ${revision_filename}
|
||||
Loading…
Reference in a new issue