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
|
@ -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}
|
|
@ -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}
|
|
@ -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<TABLE_SIZE; i++ )
|
||||
|
|
|
@ -77,8 +77,8 @@
|
|||
#include "pa_trace.h" /* still usefull?*/
|
||||
#include "pa_debugprint.h"
|
||||
|
||||
#ifndef PA_SVN_REVISION
|
||||
#include "pa_svnrevision.h"
|
||||
#ifndef PA_GIT_REVISION
|
||||
#include "pa_gitrevision.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -110,7 +110,7 @@
|
|||
#define TOSTRING(x) STRINGIFY(x)
|
||||
|
||||
#define PA_VERSION_STRING_ TOSTRING(paVersionMajor) "." TOSTRING(paVersionMinor) "." TOSTRING(paVersionSubMinor)
|
||||
#define PA_VERSION_TEXT_ "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_SVN_REVISION)
|
||||
#define PA_VERSION_TEXT_ "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_GIT_REVISION)
|
||||
|
||||
int Pa_GetVersion( void )
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ static PaVersionInfo versionInfo_ = {
|
|||
/*.versionMajor =*/ paVersionMajor,
|
||||
/*.versionMinor =*/ paVersionMinor,
|
||||
/*.versionSubMinor =*/ paVersionSubMinor,
|
||||
/*.versionControlRevision =*/ TOSTRING(PA_SVN_REVISION),
|
||||
/*.versionControlRevision =*/ TOSTRING(PA_GIT_REVISION),
|
||||
/*.versionText =*/ PA_VERSION_TEXT_
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#define PA_GIT_REVISION unknown
|
|
@ -1 +0,0 @@
|
|||
#define PA_SVN_REVISION unknown
|
|
@ -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}
|
|
@ -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}
|
Loading…
Reference in New Issue