From a553478d71f24bff6e0a72db66fc68e9a5b5847a Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Mon, 5 Sep 2016 17:03:27 -0700 Subject: [PATCH] PA_GIT_REVISION: new scripts to replace SVN revision update_gitrevision.sh should be run before building on Mac or Linux. --- clear_gitrevision.sh | 12 ++++++++++++ clear_svnrevision.sh | 12 ------------ examples/paex_sine.c | 3 ++- src/common/pa_front.c | 8 ++++---- src/common/pa_gitrevision.h | 1 + src/common/pa_svnrevision.h | 1 - update_gitrevision.sh | 17 +++++++++++++++++ update_svnrevision.sh | 17 ----------------- 8 files changed, 36 insertions(+), 35 deletions(-) create mode 100755 clear_gitrevision.sh delete mode 100755 clear_svnrevision.sh create mode 100644 src/common/pa_gitrevision.h delete mode 100644 src/common/pa_svnrevision.h create mode 100755 update_gitrevision.sh delete mode 100755 update_svnrevision.sh diff --git a/clear_gitrevision.sh b/clear_gitrevision.sh new file mode 100755 index 0000000..b1b087c --- /dev/null +++ b/clear_gitrevision.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Clear the Git commit SHA in the include file. +# This should be run before checking in code to Git. +# +revision_filename=src/common/pa_gitrevision.h + +# Update the include file with the current GIT revision. +echo "#define PA_GIT_REVISION unknown" > ${revision_filename} + +echo ${revision_filename} now contains +cat ${revision_filename} diff --git a/clear_svnrevision.sh b/clear_svnrevision.sh deleted file mode 100755 index 2501630..0000000 --- a/clear_svnrevision.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# Clear the SVN revision in the include file. -# This should be run before checking in code to SVN. -# -revision_filename=src/common/pa_svnrevision.h - -# Update the include file with the current SVN revision. -echo "#define PA_SVN_REVISION unknown" > ${revision_filename} - -echo ${revision_filename} now contains -cat ${revision_filename} diff --git a/examples/paex_sine.c b/examples/paex_sine.c index ed4cb52..86bf31b 100644 --- a/examples/paex_sine.c +++ b/examples/paex_sine.c @@ -113,8 +113,9 @@ int main(void) paTestData data; int i; - + printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER); + printf("%s\n", Pa_GetVersionText()); /* initialise sinusoidal wavetable */ for( i=0; i ${revision_filename} +git rev-parse HEAD >> ${revision_filename} + +echo ${revision_filename} now contains +cat ${revision_filename} diff --git a/update_svnrevision.sh b/update_svnrevision.sh deleted file mode 100755 index 7a4631a..0000000 --- a/update_svnrevision.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Write the SVN revision to an include file. -# This should be run before compiling code on Linux or Macintosh. -# -revision_filename=src/common/pa_svnrevision.h - -# Run svnversion first to make sure it is installed before corrupting the -# include file. -svnversion . - -# Update the include file with the current SVN revision. -echo -n "#define PA_SVN_REVISION " > ${revision_filename} -svnversion . >> ${revision_filename} - -echo ${revision_filename} now contains -cat ${revision_filename} -- 2.43.0