Commit a6f7c1b1 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Add a pre-build step for generating the revision number

parent d231a731
......@@ -15,7 +15,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="vlc" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1214474332" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug">
<configuration artifactName="vlc" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1214474332" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug" prebuildStep="${workspace_loc:/${ProjName}/hacks/version.sh}">
<folderInfo id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1214474332." name="/" resourcePath="">
<toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug.1528053427" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.98876963" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
......
......@@ -15,7 +15,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="vlc" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1214474332" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug">
<configuration artifactName="vlc" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1214474332" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug" prebuildStep="${workspace_loc:/${ProjName}/hacks/version.sh}">
<folderInfo id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1214474332." name="/" resourcePath="">
<toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug.1528053427" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.98876963" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
......
#!/bin/sh
BASEDIR=$(dirname $0)
REVISION=`git rev-parse --short HEAD`
cat >${BASEDIR}/../inc/version.h <<EOL
#ifndef VERSION_H_
#define VERSION_H_
#define REVISION "${REVISION}"
#endif
EOL
#ifndef VERSION_H_
#define VERSION_H_
#define REVISION "unknown"
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment